2011-05-26 Rob Buis <rbuis@rim.com>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-05-26  Rob Buis  <rbuis@rim.com>
2
3         Reviewed by Dirk Schulze.
4
5         Dynamically created <animate> elements do not animate upon document insertion as they should
6         https://bugs.webkit.org/show_bug.cgi?id=20028
7
8         Tests: svg/animations/animate-insert-begin.html
9                svg/animations/animate-insert-no-begin.html
10
11         Move animation initializing and rescheduling to insertedIntoDocument. This way animate elements
12         dynamicaly inserted into the document using js start as well.
13
14         * svg/animation/SVGSMILElement.cpp:
15         (WebCore::SVGSMILElement::insertedIntoDocument):
16         * svg/animation/SVGSMILElement.h:
17
18 2011-05-26  Andreas Kling  <kling@webkit.org>
19
20         Reviewed by Benjamin Poulain.
21
22         JSC DOM bindings: ExecState::argumentCount() is size_t, not int.
23         https://bugs.webkit.org/show_bug.cgi?id=61530
24
25         * bindings/scripts/CodeGeneratorJS.pm:
26         * bindings/scripts/test/JS/JSTestObj.cpp:
27         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
28         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg):
29         (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD):
30         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
31         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
32         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
33         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
34         (WebCore::jsTestObjPrototypeFunctionClassMethodWithOptional):
35
36 2011-05-26  Simon Fraser  <simon.fraser@apple.com>
37
38         Reviewed by Adam Roben.
39
40         Some repeating linear gradients look wrong
41         https://bugs.webkit.org/show_bug.cgi?id=61371
42
43         Test: fast/gradients/css3-repeating-linear-gradients2.html
44         
45         Fix incorrect stop duplication code when filling forwards a repeating
46         gradient. The "if (srcStopOrdinal < originalNumStops - 1)" test was wrong
47         because srcStopOrdinal had been adjusted for stops added by start-filling,
48         but originalNumStops had not. Fix by considering srcStopOrdinal as an index
49         into the original stops, so comparing it with originalNumStops remains valid.
50
51         * css/CSSGradientValue.cpp:
52         (WebCore::CSSGradientValue::addStops):
53
54 2011-05-26  Vsevolod Vlasov  <vsevik@chromium.org>
55
56         Reviewed by Yury Semikhatsky.
57
58         Web Inspector: In network panel, show transfer size in a first line of resource row.
59         https://bugs.webkit.org/show_bug.cgi?id=61354
60
61         * English.lproj/localizedStrings.js:
62         * inspector/front-end/NetworkPanel.js:
63         (WebInspector.NetworkPanel.prototype._createTable):
64         (WebInspector.NetworkDataGridNode.prototype._refreshSizeCell):
65
66 2011-05-25  Simon Fraser  <simon.fraser@apple.com>
67
68         Reviewed by Dan Bernstein.
69
70         Always antialias borders, outlines and rules when scaling
71         https://bugs.webkit.org/show_bug.cgi?id=61502
72         
73         r84273 changed the behavior of drawLineForBoxSide() to never antialias by default.
74         This actually disabled antialiasing in some circumstances where it used to be enabled,
75         for example collapsed table border drawing.
76         
77         Fix by allowing antialiasing for collapsed table borders, column rules and span
78         outlines when the context is scaled.
79
80         Test: fast/borders/border-antialiasing.html
81
82         * rendering/RenderBlock.cpp:
83         (WebCore::RenderBlock::paintColumnRules):
84         * rendering/RenderInline.cpp:
85         (WebCore::RenderInline::paintOutline):
86         (WebCore::RenderInline::paintOutlineForLine):
87         * rendering/RenderTableCell.cpp:
88         (WebCore::RenderTableCell::paintCollapsedBorder):
89
90 2011-05-26  Vsevolod Vlasov  <vsevik@chromium.org>
91
92         Reviewed by Yury Semikhatsky.
93
94         Web Inspector: Use different SourceFrame instances for ResourcesPanel and NetworkPanel
95         https://bugs.webkit.org/show_bug.cgi?id=59193
96
97         * inspector/front-end/NetworkItemView.js:
98         (WebInspector.NetworkItemView):
99         (WebInspector.NetworkItemView._contentViewForResource):
100         * inspector/front-end/NetworkPanel.js:
101         (WebInspector.NetworkPanel.prototype._refreshResource):
102         * inspector/front-end/Resource.js:
103         (WebInspector.Resource.prototype.get messages):
104         (WebInspector.Resource.prototype.addMessage):
105         (WebInspector.Resource.prototype.set errors):
106         (WebInspector.Resource.prototype.set warnings):
107         (WebInspector.Resource.prototype.clearErrorsAndWarnings):
108         * inspector/front-end/ResourceTreeModel.js:
109         (WebInspector.ResourceTreeModel.prototype._consoleMessageAdded):
110         * inspector/front-end/ResourceView.js:
111         (WebInspector.ResourceView.hasTextContent):
112         (WebInspector.ResourceView.nonSourceViewForResource):
113         (WebInspector.ResourceSourceFrame):
114         (WebInspector.ResourceSourceFrame.mimeTypeForResource):
115         (WebInspector.ResourceSourceFrame.prototype.requestContent):
116         (WebInspector.ResourceSourceFrame.prototype.suggestedFileName):
117         (WebInspector.EditableResourceSourceFrame):
118         (WebInspector.EditableResourceSourceFrame.prototype.doubleClick):
119         (WebInspector.EditableResourceSourceFrame.prototype.editContent):
120         (WebInspector.EditableResourceSourceFrame.prototype.cancelEditing):
121         (WebInspector.EditableResourceSourceFrame.prototype.afterTextChanged):
122         (WebInspector.EditableResourceSourceFrame.prototype._clearIncrementalUpdateTimer):
123         (WebInspector.ResourceRevisionSourceFrame):
124         (WebInspector.ResourceRevisionSourceFrame.prototype.requestContent):
125         * inspector/front-end/ResourcesPanel.js:
126         (WebInspector.ResourcesPanel.prototype.showResource):
127         (WebInspector.ResourcesPanel.prototype._showResourceView):
128         (WebInspector.ResourcesPanel.prototype._resourceViewForResource):
129         (WebInspector.ResourcesPanel.prototype._showRevisionView):
130         (WebInspector.ResourcesPanel.prototype._sourceViewForRevision):
131         (WebInspector.ResourcesPanel.prototype.searchCanceled):
132         (WebInspector.ResourcesPanel.prototype._findTreeElementForRevision):
133         (WebInspector.ResourcesPanel.prototype._findTreeElementForRevision.getParent):
134         (WebInspector.FrameResourceTreeElement):
135         (WebInspector.FrameResourceTreeElement.prototype.onattach):
136         (WebInspector.FrameResourceTreeElement.prototype._updateErrorsAndWarningsBubbles):
137         (WebInspector.FrameResourceTreeElement.prototype._errorsWarningsCleared):
138         (WebInspector.FrameResourceTreeElement.prototype._errorsWarningsMessageAdded):
139         (WebInspector.FrameResourceTreeElement.prototype._appendRevision):
140         (WebInspector.FrameResourceTreeElement.prototype.sourceView):
141         (WebInspector.FrameResourceTreeElement.prototype._createSourceView):
142         (WebInspector.FrameResourceTreeElement.prototype._recreateSourceView):
143         (WebInspector.ResourceRevisionTreeElement):
144         (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent):
145         (WebInspector.ResourceRevisionTreeElement.prototype.sourceView):
146
147 2011-05-26  Andreas Kling  <kling@webkit.org>
148
149         Reviewed by Darin Adler.
150
151         JSC DOM bindings: Use isUndefinedOrNull() instead of (isNull() || isUndefined()).
152         https://bugs.webkit.org/show_bug.cgi?id=61472
153
154         * bindings/scripts/CodeGeneratorJS.pm:
155         * bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined.
156         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
157         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
158
159 2011-05-26  Keishi Hattori  <keishi@webkit.org>
160
161         Reviewed by Kent Tamura.
162
163         Add <input type=color> appearance.
164         https://bugs.webkit.org/show_bug.cgi?id=61275
165
166         Test: fast/forms/color/input-appearance-color.html
167
168         * css/html.css:
169         (input[type="color"]): Adds square-button appearance.
170         (input[type="color"]::-webkit-color-swatch-wrapper):
171         (input[type="color"]::-webkit-color-swatch):
172         (input[type="color"][list]): Adds menulist appearance.
173         (input[type="color"][list]::-webkit-color-swatch-wrapper):
174         (input[type="color"][list]::-webkit-color-swatch):
175         * html/ColorInputType.cpp:
176         (WebCore::ColorInputType::createShadowSubtree): Creates -webkit-color-swatch inside -webkit-color-swatch-wrapper.
177         (WebCore::ColorInputType::updateColorSwatch): Updates background color of shadowColorSwatch.
178         (WebCore::ColorInputType::valueChanged): Calls updateColorSwatch.
179         (WebCore::ColorInputType::shadowColorSwatch): Gets shadowColorSwatch element.
180         * html/ColorInputType.h:
181         (WebCore::ColorInputType::ColorInputType): Changed to inherit InputType.
182
183 2011-05-26  Kent Tamura  <tkent@chromium.org>
184
185         Reviewed by Dimitri Glazkov.
186
187         Fix a bug that <input type="number"> dispatches two blurs when tabbing
188         from an invalid number
189         https://bugs.webkit.org/show_bug.cgi?id=59071
190
191         NumberInputType::handleBlurEvent() dispatched an extra focus event
192         and an extra blur event because
193         SelectionController::textWillBeReplaced() called by
194         RenderTextControlSingleLine::updateFromElement() focuses a node
195         with the selection.
196
197         In order to avoid this problem,
198          - Introduce Node::willBlur()
199            It is called before any state changes by a blur event.
200          - Call RenderTextControlSingleLine::updateFromElement() in willBlur()
201            It avoids extra focus/blur events because Document::m_focusedNode is
202            still the number input during willBlur().
203
204         Test: fast/forms/input-number-blur-twice.html
205
206         * dom/Document.cpp:
207         (WebCore::Document::setFocusedNode): Calls Node::beforeBlueEvent().
208         * dom/Node.cpp:
209         (WebCore::Node::willBlur):
210           Default empty implementation of willBlur().
211         * dom/Node.h: Declare willBlur().
212         * html/HTMLInputElement.cpp:
213         (WebCore::HTMLInputElement::willBlur):
214           Added.  It just calls InputType::willBlur().
215         (WebCore::HTMLInputElement::handleBlurEvent):
216           Removed InputType::handleBlurEvent() call.
217         * html/HTMLInputElement.h: Declare willBlur().
218         * html/InputType.cpp:
219         (WebCore::InputType::willBlur): Default empty implementation.
220         (WebCore::InputType::handleBlurEvent): Removed.
221         * html/InputType.h: Declare willBlur(), remove handleBlurEvent().
222         * html/NumberInputType.cpp:
223         (WebCore::NumberInputType::willBlur):
224           Move the code in handleBlurEvent() here.
225         * html/NumberInputType.h: Declare willBlur().
226
227 2011-05-25  Hans Wennborg  <hans@chromium.org>
228
229         Reviewed by Steve Block.
230
231         IndexedDB: Support LevelDB transactions.
232         https://bugs.webkit.org/show_bug.cgi?id=61270
233
234         Introduce LevelDBTransaction, which implements in-memory transaction
235         support on top of LevelDB, and hook this up for IndexedDB to use.
236
237         This is all covered by existing tests.
238
239         * CMakeLists.txt:
240         * GNUmakefile.list.am:
241         * WebCore.gypi:
242         * WebCore.pro:
243         * WebCore.xcodeproj/project.pbxproj:
244         * platform/leveldb/LevelDBDatabase.cpp:
245         (WebCore::LevelDBDatabase::open):
246         (WebCore::LevelDBDatabase::put):
247         (WebCore::LevelDBDatabase::remove):
248         (WebCore::LevelDBDatabase::write):
249         (WebCore::IteratorImpl::IteratorImpl):
250         (WebCore::IteratorImpl::isValid):
251         (WebCore::IteratorImpl::seekToLast):
252         (WebCore::IteratorImpl::seek):
253         (WebCore::IteratorImpl::next):
254         (WebCore::IteratorImpl::prev):
255         (WebCore::IteratorImpl::key):
256         (WebCore::IteratorImpl::value):
257         (WebCore::LevelDBDatabase::createIterator):
258         (WebCore::LevelDBDatabase::comparator):
259         * platform/leveldb/LevelDBDatabase.h:
260         * platform/leveldb/LevelDBIterator.h:
261         (WebCore::LevelDBIterator::~LevelDBIterator):
262         * platform/leveldb/LevelDBTransaction.cpp: Added.
263         (WebCore::LevelDBTransaction::create):
264         (WebCore::LevelDBTransaction::LevelDBTransaction):
265         (WebCore::LevelDBTransaction::clearTree):
266         (WebCore::LevelDBTransaction::~LevelDBTransaction):
267         (WebCore::makeVector):
268         (WebCore::LevelDBTransaction::set):
269         (WebCore::LevelDBTransaction::put):
270         (WebCore::LevelDBTransaction::remove):
271         (WebCore::LevelDBTransaction::get):
272         (WebCore::LevelDBTransaction::commit):
273         (WebCore::LevelDBTransaction::rollback):
274         (WebCore::LevelDBTransaction::createIterator):
275         (WebCore::LevelDBTransaction::TreeIterator::create):
276         (WebCore::LevelDBTransaction::TreeIterator::isValid):
277         (WebCore::LevelDBTransaction::TreeIterator::seekToLast):
278         (WebCore::LevelDBTransaction::TreeIterator::seek):
279         (WebCore::LevelDBTransaction::TreeIterator::next):
280         (WebCore::LevelDBTransaction::TreeIterator::prev):
281         (WebCore::LevelDBTransaction::TreeIterator::key):
282         (WebCore::LevelDBTransaction::TreeIterator::value):
283         (WebCore::LevelDBTransaction::TreeIterator::isDeleted):
284         (WebCore::LevelDBTransaction::TreeIterator::reset):
285         (WebCore::LevelDBTransaction::TreeIterator::~TreeIterator):
286         (WebCore::LevelDBTransaction::TreeIterator::TreeIterator):
287         (WebCore::LevelDBTransaction::TransactionIterator::create):
288         (WebCore::LevelDBTransaction::TransactionIterator::TransactionIterator):
289         (WebCore::LevelDBTransaction::TransactionIterator::isValid):
290         (WebCore::LevelDBTransaction::TransactionIterator::seekToLast):
291         (WebCore::LevelDBTransaction::TransactionIterator::seek):
292         (WebCore::LevelDBTransaction::TransactionIterator::next):
293         (WebCore::LevelDBTransaction::TransactionIterator::prev):
294         (WebCore::LevelDBTransaction::TransactionIterator::key):
295         (WebCore::LevelDBTransaction::TransactionIterator::value):
296         (WebCore::LevelDBTransaction::TransactionIterator::handleConflictsAndDeletes):
297         (WebCore::LevelDBTransaction::TransactionIterator::setCurrentIteratorToSmallestKey):
298         (WebCore::LevelDBTransaction::TransactionIterator::setCurrentIteratorToLargestKey):
299         (WebCore::LevelDBTransaction::registerIterator):
300         (WebCore::LevelDBTransaction::unregisterIterator):
301         (WebCore::LevelDBTransaction::resetIterators):
302         * platform/leveldb/LevelDBTransaction.h: Added.
303         (WebCore::LevelDBTransaction::AVLTreeAbstractor::get_less):
304         (WebCore::LevelDBTransaction::AVLTreeAbstractor::set_less):
305         (WebCore::LevelDBTransaction::AVLTreeAbstractor::get_greater):
306         (WebCore::LevelDBTransaction::AVLTreeAbstractor::set_greater):
307         (WebCore::LevelDBTransaction::AVLTreeAbstractor::get_balance_factor):
308         (WebCore::LevelDBTransaction::AVLTreeAbstractor::set_balance_factor):
309         (WebCore::LevelDBTransaction::AVLTreeAbstractor::compare_key_key):
310         (WebCore::LevelDBTransaction::AVLTreeAbstractor::compare_key_node):
311         (WebCore::LevelDBTransaction::AVLTreeAbstractor::compare_node_node):
312         (WebCore::LevelDBTransaction::AVLTreeAbstractor::null):
313         (WebCore::LevelDBTransaction::TransactionIterator::~TransactionIterator):
314         * platform/leveldb/LevelDBWriteBatch.cpp:
315         (WebCore::LevelDBWriteBatch::create):
316         (WebCore::LevelDBWriteBatch::LevelDBWriteBatch):
317         (WebCore::LevelDBWriteBatch::~LevelDBWriteBatch):
318         (WebCore::makeSlice):
319         (WebCore::LevelDBWriteBatch::put):
320         (WebCore::LevelDBWriteBatch::remove):
321         (WebCore::LevelDBWriteBatch::clear):
322         * storage/IDBLevelDBBackingStore.cpp:
323         (WebCore::getInt):
324         (WebCore::putInt):
325         (WebCore::getString):
326         (WebCore::putString):
327         (WebCore::getNewObjectStoreId):
328         (WebCore::IDBLevelDBBackingStore::createObjectStore):
329         (WebCore::deleteRange):
330         (WebCore::IDBLevelDBBackingStore::deleteObjectStore):
331         (WebCore::IDBLevelDBBackingStore::getObjectStoreRecord):
332         (WebCore::getNewVersionNumber):
333         (WebCore::IDBLevelDBBackingStore::putObjectStoreRecord):
334         (WebCore::IDBLevelDBBackingStore::clearObjectStore):
335         (WebCore::IDBLevelDBBackingStore::deleteObjectStoreRecord):
336         (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber):
337         (WebCore::IDBLevelDBBackingStore::keyExistsInObjectStore):
338         (WebCore::IDBLevelDBBackingStore::forEachObjectStoreRecord):
339         (WebCore::getNewIndexId):
340         (WebCore::IDBLevelDBBackingStore::createIndex):
341         (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
342         (WebCore::findGreatestKeyLessThan):
343         (WebCore::versionExists):
344         (WebCore::IDBLevelDBBackingStore::getPrimaryKeyViaIndex):
345         (WebCore::IDBLevelDBBackingStore::keyExistsInIndex):
346         (WebCore::findLastIndexKeyEqualTo):
347         (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
348         (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
349         (WebCore::IDBLevelDBBackingStore::openIndexCursor):
350         (WebCore::IDBLevelDBBackingStore::createTransaction):
351         (WebCore::IDBLevelDBBackingStore::Transaction::create):
352         (WebCore::IDBLevelDBBackingStore::Transaction::Transaction):
353         (WebCore::IDBLevelDBBackingStore::Transaction::begin):
354         (WebCore::IDBLevelDBBackingStore::Transaction::commit):
355         (WebCore::IDBLevelDBBackingStore::Transaction::rollback):
356         * storage/IDBLevelDBBackingStore.h:
357         * storage/IDBTransactionBackendImpl.cpp:
358         (WebCore::IDBTransactionBackendImpl::abort):
359
360 2011-05-26  Shane Stephens  <shanestephens@google.com>
361
362         Reviewed by James Robinson.
363
364         REGRESSION (r81992): layout triggered by position update fails to apply when transform is updated at same time
365         https://bugs.webkit.org/show_bug.cgi?id=60689
366
367         Test: transforms/2d/set-transform-and-top.html
368
369         * rendering/RenderBlock.cpp:
370         (WebCore::RenderBlock::simplifiedLayout):
371
372 2011-05-26  Igor Oliveira  <igor.oliveira@openbossa.org>
373
374         Reviewed by Andreas Kling.
375
376         drag-not-loaded-image.html test crashes when WebKit is built with debug option
377         https://bugs.webkit.org/show_bug.cgi?id=61480
378
379         Checks if image has content before starting to drag.
380
381         * page/DragController.cpp:
382         (WebCore::DragController::startDrag):
383
384 2011-05-26  Alok Priyadarshi  <alokp@chromium.org>
385
386         Reviewed by James Robinson.
387
388         [chromium] Cannot create stencil render-buffer for accelerated drawing on desktop GL
389         https://bugs.webkit.org/show_bug.cgi?id=61444
390
391         Used DEPTH24_STENCIL8 format for stencil buffer instead of STENCIL_INDEX8.
392         Packed depth-stencil buffer is the most common format supported by graphics cards.
393         It is not very robust to rely on just one format being supported,
394         so long term the task of creating FBO should be delegated to SKIA,
395         which has necessary code to iterate through all possible formats.
396
397         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
398         (WebCore::LayerTextureUpdaterSkPicture::deleteFrameBuffer):
399         (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer):
400
401 2011-05-25  Jer Noble  <jer.noble@apple.com>
402
403         Reviewed by Dan Bernstein.
404
405         30 second rewind button dysfunctional viewing trailers fullscreen.
406         https://bugs.webkit.org/show_bug.cgi?id=61505
407
408         Add support for painting MediaReturnToRealtimeButton, as well as hide and show
409         the correct default video control buttons when entering full-screen mode.
410
411         * css/fullscreenQuickTime.css:
412         (video:-webkit-full-screen::-webkit-media-controls-return-to-realtime-button):
413         * html/shadow/MediaControlRootElement.cpp:
414         (WebCore::MediaControlRootElement::enteredFullscreen): Show the "Back 30s" and
415             "Return to Realtime" buttons for Live Streams in full-screen mode.
416         (WebCore::MediaControlRootElement::exitedFullscreen): Reset the styles of 
417             all the buttons affected by enteredFullscreen().
418         * rendering/RenderMediaControls.cpp:
419         (WebCore::RenderMediaControls::paintMediaControlsPart): Add support for 
420             MediaReturnToRealtimeButton.
421
422 2011-05-25  Luke Macpherson   <macpherson@chromium.org>
423
424         Reviewed by Dimitri Glazkov.
425
426         Implement various CSS font properties in CSSStyleApplyProperty.
427         https://bugs.webkit.org/show_bug.cgi?id=60603
428
429         No new tests - refactoring only.
430
431         * css/CSSStyleApplyProperty.cpp:
432         (WebCore::ApplyPropertyFont):
433         Added templated class to handle font properties
434         (WebCore::ApplyPropertyFontWeight):
435         Added class to handle font weight calculation
436         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
437         Instantiate ApplyPropertyFont/ApplyPropertyFontWeight for appropriate properties.
438         * css/CSSStyleSelector.cpp:
439         (WebCore::CSSStyleSelector::applyProperty):
440         Remove properties that are now implemented in CSSStyleApplyProperty
441         * css/CSSStyleSelector.h:
442         (WebCore::CSSStyleSelector::fontDescription):
443         Added getter for m_style->fontDescription()
444         (WebCore::CSSStyleSelector::parentFontDescription):
445         Added getter for m_parentStyle->fontDescription()
446         (WebCore::CSSStyleSelector::setFontDescription):
447         Added setter for m_style->setFontDescription() that automatically sets m_fontDirty
448
449 2011-05-25  James Simonsen  <simonjam@chromium.org>
450
451         Reviewed by Adam Barth.
452
453         Add site-specific hack for zipcar.com with old versions of requirejs.
454         https://bugs.webkit.org/show_bug.cgi?id=61321
455
456         Old versions of requirejs (< 0.15.0) try to load scripts in parallel but execute them in
457         order. This used to work in webkit by setting a bogus script type (script/cache), then
458         changing the type to a valid one when they wanted to execute it. This hack translates the
459         behavior into the new API (by disabling forceAsync).
460
461         * html/HTMLScriptElement.cpp:
462         (WebCore::needsOldRequirejsQuirk): Added.
463         (WebCore::HTMLScriptElement::insertedIntoDocument):
464         If hack is needed, set a proper script type so script loads.
465         If script isn't async, disable forceAsync so script executes in order.
466
467 2011-05-25  Andreas Kling  <kling@webkit.org>
468
469         Reviewed by David Levin.
470
471         Rebaseline run-bindings-tests.
472         https://bugs.webkit.org/show_bug.cgi?id=61469
473
474         * bindings/scripts/test/JS/:
475         * bindings/scripts/test/V8/:
476
477 2011-05-25  Levi Weintraub  <leviw@chromium.org>
478
479         Reviewed by Eric Seidel.
480
481         Switch itemBoundingBoxRect to use IntPoint
482         https://bugs.webkit.org/show_bug.cgi?id=60789
483
484         Changing itemBoundingBoxRect to use an IntPoint representing the offset
485         to be added tot he box rect instead of a pair of ints.
486
487         No new tests since this is just refactoring.
488
489         * accessibility/AccessibilityListBox.cpp:
490         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
491         * accessibility/AccessibilityListBoxOption.cpp:
492         (WebCore::AccessibilityListBoxOption::elementRect):
493         * rendering/RenderListBox.cpp:
494         (WebCore::RenderListBox::itemBoundingBoxRect):
495         (WebCore::RenderListBox::addFocusRingRects):
496         (WebCore::RenderListBox::paintItemForeground):
497         (WebCore::RenderListBox::paintItemBackground):
498         (WebCore::RenderListBox::nodeAtPoint):
499         * rendering/RenderListBox.h:
500
501 2011-05-24  MORITA Hajime  <morrita@google.com>
502
503         Reviewed by Dimitri Glazkov.
504
505         RenderText with empty text is not created inside ShadowContentElement 
506         https://bugs.webkit.org/show_bug.cgi?id=61111        
507
508         - Changed Text::rendererIsNeeded() to be shadow-aware.
509         - previousRenderer(), nextRenderer() and parentRenderer() on NodeRenderingContext is now
510           safe even if it's used with an attached node, which was originally used only during attach().
511           We need this change because these APIs are called inside CharacterData::updateRenderer() callstack.
512         
513         Tests: fast/html/details-replace-summary-child.html
514                fast/html/details-replace-text.html
515
516         * dom/NodeRenderingContext.cpp:
517         (WebCore::NodeRenderingContext::NodeRenderingContext):
518         (WebCore::NodeRenderingContext::nextRenderer):
519         (WebCore::NodeRenderingContext::previousRenderer):
520         (WebCore::NodeRenderingContext::parentRenderer):
521         (WebCore::NodeRenderingContext::shouldCreateRenderer):
522         * dom/NodeRenderingContext.h:
523         (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle):
524         * dom/Text.cpp:
525         (WebCore::Text::rendererIsNeeded):
526
527 2011-05-25  Sailesh Agrawal  <sail@chromium.org>
528
529         Reviewed by Tony Chang.
530
531         Rename ScrollbarOverlayUtilitiesMac to ScrollbarOverlayUtilitiesChromiumMac
532         https://bugs.webkit.org/show_bug.cgi?id=61401
533
534         ScrollbarOverlayUtilitiesMac.mm was being excluded from the WebCore project. Fix was to make sure the file name ended with ChromiumMac.
535
536         * WebCore.gypi:
537         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Copied from Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesMac.h.
538         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Copied from Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesMac.mm.
539         * platform/chromium/ScrollbarOverlayUtilitiesMac.h: Removed.
540         * platform/chromium/ScrollbarOverlayUtilitiesMac.mm: Removed.
541
542 2011-05-25  James Robinson  <jamesr@chromium.org>
543
544         Reviewed by Geoffrey Garen
545
546         CachedResource overhead size calculation ignores the actual size of the URL
547         https://bugs.webkit.org/show_bug.cgi?id=61481
548
549         CachedResource::overheadSize is used to determine the size of an entry in the memory cache to know when to evict
550         it.  When the resource is a large data: URL, for example representing image or audio data, the URL size itself
551         can be significant.
552
553         This patch uses an estimate of actual number of bytes used by the URL that is valid for ASCII urls and close for
554         other types of strings instead of a fixed number.
555
556         * loader/cache/CachedResource.cpp:
557         (WebCore::CachedResource::overheadSize):
558
559 2011-05-25  Oliver Hunt  <oliver@apple.com>
560
561         Reviewed by Geoffrey Garen.
562
563         Make RegExp GC allocated
564         https://bugs.webkit.org/show_bug.cgi?id=61490
565
566         RegExp is GC'd so we don't need the RefPtr shenanigans anymore.
567
568         * bindings/js/SerializedScriptValue.cpp:
569         (WebCore::CloneDeserializer::readTerminal):
570
571 2011-05-25  Martin Robinson  <mrobinson@igalia.com>
572
573         Reviewed by Dirk Schulze.
574
575         [Cairo] Move the global alpha property from GraphicsContext to PlatformContextCairo
576         https://bugs.webkit.org/show_bug.cgi?id=60185
577
578         Remove Cairo #ifdefs from GraphicsContext.h by pushing the global alpha
579         state into PlatformContextCairo. Since Cairo is the only platform that needs
580         to store this, this is the proper place for it. Change the image mask stack into
581         a more generic state stack that can keep track of the multiple bits of platform
582         specific state and properly handle save/restore pairs.
583
584         No new tests. This is just a code refactor.
585
586         * platform/graphics/GraphicsContext.h: Remove Cairo #ifdefs.
587         (WebCore::GraphicsContextState::GraphicsContextState): Ditto.
588         * platform/graphics/cairo/ContextShadowCairo.cpp: Access global alpha from PlatformContextCairo now.
589         (WebCore::ContextShadow::drawRectShadow):
590         * platform/graphics/cairo/FontCairo.cpp: Ditto.
591         (WebCore::Font::drawGlyphs):
592         * platform/graphics/cairo/GraphicsContextCairo.cpp:
593         (WebCore::setPlatformFill): Ditto.
594         (WebCore::setPlatformStroke): Ditto.
595         (WebCore::GraphicsContext::setAlpha): Ditto.
596         * platform/graphics/cairo/PlatformContextCairo.cpp: Moved ImageMaskInformation class from the
597         header file, since it can be private now. Abstract the image mask state and the global alpha
598         in a generic State class.
599         (WebCore::ImageMaskInformation::update): 
600         (WebCore::ImageMaskInformation::isValid):
601         (WebCore::ImageMaskInformation::maskSurface):
602         (WebCore::ImageMaskInformation::maskRect):
603         (WebCore::PlatformContextCairo::State::State): Added.
604         (WebCore::PlatformContextCairo::PlatformContextCairo): Intialize the state
605         class when this class is constructed.
606         (WebCore::PlatformContextCairo::restore): Now pop the last state off the state stack.
607         (WebCore::PlatformContextCairo::~PlatformContextCairo): Added this so that we can forward
608         declare the State class in the header.
609         (WebCore::PlatformContextCairo::save): Push a new state onto the stack.
610         (WebCore::PlatformContextCairo::pushImageMask): Operate on the state stack now.
611         (WebCore::PlatformContextCairo::globalAlpha): Added.
612         (WebCore::PlatformContextCairo::setGlobalAlpha): Added.
613         (WebCore::PlatformContextCairo::drawSurfaceToContext: Call globalAlpha().
614         * platform/graphics/cairo/PlatformContextCairo.h: Changed the image mask stack
615         into a more generic state stack, much like PlatformContextChromium.
616
617 2011-05-25  Mark Rowe  <mrowe@apple.com>
618
619         Reviewed by Sam Weinig.
620
621         <rdar://problem/9504058> Need some way to query user gesture state from injected bundle
622
623         * WebCore.exp.in: Add an export that WebKit2 needs.
624
625 2011-05-25  Jer Noble  <jer.noble@apple.com>
626
627         Ureviewed; Build fix for Leopard and Snow Leopard.
628
629         Move _wkQTMovieResolvedURL outside of a #if check for Leopard and SL.
630
631         * WebCore.exp.in:
632
633 2011-05-25  Michael Saboff  <msaboff@apple.com>
634
635         Reviewed by Sam Weinig.
636
637         Cleanup of commented items from https://bugs.webkit.org/show_bug.cgi?id=61222
638         https://bugs.webkit.org/show_bug.cgi?id=61478
639
640         Cleanup of further comments after patch was landed.  Changes include
641         using /2 instead of >>1, adding a blank line after class include,
642         making method names start with lower case and adding clarifying
643         comments.
644
645         No new tests as the changes are stylistic and not functional.
646
647         * loader/cache/MemoryCache.cpp:
648         (WebCore::MemoryCache::pruneLiveResourcesToPercentage):
649         (WebCore::MemoryCache::pruneDeadResourcesToPercentage):
650         * loader/cache/MemoryCache.h:
651         (WebCore::MemoryCache::pruneToPercentage):
652         * platform/mac/MemoryPressureHandlerMac.mm:
653         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
654
655 2011-05-25  Stephanie Lewis  <slewis@apple.com>
656
657         Reviewed by Brady Eidson.
658
659         https://bugs.webkit.org/show_bug.cgi?id=61407
660         part of <rdar://problem/8675177>
661         Move Quicklook quirk down into WebCore so it can be caculated when the user
662         starts a reload.  Restructure the conditions so it only called when absolutely 
663         necessary.
664   
665         No change in functionality so no new tests.
666
667         * loader/FrameLoader.cpp:
668         (WebCore::FrameLoader::subresourceCachePolicy):
669         * page/Settings.cpp:
670         (WebCore::Settings::Settings):
671         * page/Settings.h:
672         * platform/network/cf/ResourceRequest.h:
673         * platform/network/mac/ResourceRequestMac.mm:
674         (WebCore::initQuickLookResourceCachingQuirks):
675         (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
676
677 2011-05-24  Jer Noble  <jer.noble@apple.com>
678
679         Reviewed by Darin Adler.
680
681         Video fails to play on Vimeo
682         https://bugs.webkit.org/show_bug.cgi?id=61403
683
684         No new tests; Covered by media/video-canvas-source.html.
685
686         Vimeo redirects their assets from player.vimeo.com to av.vimeo.com, which is rejected
687         by AVFoundation and QTKit due to our setting a ForbidCrossSiteReference option when
688         creating an AVAsset or QTMovie. Instead, we should just reject local->remote and
689         remote->local and make our answer to hasSingleSecurityOrigin dynamic.
690
691         When checking whether a given request has a single security origin, use a 
692         SecurityOrigin to check the host, port, and scheme.
693
694         * WebCore.exp.in:
695         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
696         (WebCore::MediaPlayerPrivateAVFoundation::assetURL): Added.
697         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
698         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
699         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Exchange ForbidCrossSiteReference
700             for ForbidRemoteReferenceToLocal and ForbidLocalReferenceToRemote
701         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin): Check to see that the
702             requested and resolved URLs have the same host and port.
703         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
704         (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes): Exchange NoCrossSiteAttribute for 
705             NoRemoteToLocalSiteAttribute and NoLocalToRemoteSiteAttribute.
706         (WebCore::MediaPlayerPrivateQTKit::hasSingleSecurityOrigin):     Check to see that the
707                 requested and resolved URLs have the same host and port.
708         * platform/mac/WebCoreSystemInterface.h: Added wkAVAssetResolvedURL.
709         * platform/mac/WebCoreSystemInterface.mm: Ditto.
710
711 2011-05-25  Andrew Scherkus  <scherkus@chromium.org>
712
713         Reviewed by Eric Carlson.
714
715         Fix media element regression where ended event stopped firing after changing the src attribute.
716
717         https://bugs.webkit.org/show_bug.cgi?id=61336
718
719         Test: media/media-ended.html
720
721         * html/HTMLMediaElement.cpp:
722         (WebCore::HTMLMediaElement::prepareForLoad):
723
724 2011-05-25  Jer Noble  <jer.noble@apple.com>
725
726         Reviewed by Darin Adler.
727
728         REGRESSION: Fullscreen button on embedded Vimeo videos does nothing
729         https://bugs.webkit.org/show_bug.cgi?id=61461
730
731         Tests: fullscreen/full-screen-iframe-legacy.html
732
733         Allow calls from the legacy full-screen API to bypass the iframe
734         "webkitallowfullscreen" requirement by adding a parameter to 
735         Document::webkitRequestFullScreenForElement specifying the strictness
736         of that check.  Specify this new parameter everywhere that function is 
737         called, including in the default controls' full-screen button handler.
738
739         * dom/Document.cpp:
740         (WebCore::Document::webkitRequestFullScreenForElement):
741         * dom/Document.h:
742         * dom/Element.cpp:
743         (WebCore::Element::requestFullScreen): Renamed from webkitRequestFullScreen.
744         * html/HTMLMediaElement.cpp:
745         (WebCore::HTMLMediaElement::enterFullscreen):
746         * html/shadow/MediaControlElements.cpp:
747         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
748
749 2011-05-25  Kulanthaivel Palanichamy  <kulanthaivel@codeaurora.org>
750
751         Reviewed by David Hyatt.
752
753         Selector matching doesn't update when DOM changes ("[data-a=x] #x")
754         https://bugs.webkit.org/show_bug.cgi?id=60752
755
756         Currently CSSStyleSelector maintains a HashSet of attributes (m_selectorAttrs)
757         which are used in CSS attribute selectors to determine the need for style
758         recalculation whenever element attributes are manipulated in DOM.
759         In certain conditions (element with no style, element is styled and attribute
760         is not a mapped attribute, attribute is of type 'type' or read-only)
761         even when attribute selector matches for an element, the attribute is not
762         added to m_selectorAttrs. This results in missing style recalculations
763         when a DOM element attribute is changed and is not found in m_selectorAttrs.
764
765         Removing the above said conditions in
766         CSSStyleSelector::SelectorChecker::checkOneSelector() for registering
767         attributes in m_selectorAttrs will solve this issue. But this particular
768         function is called numerous times which triggers adding duplicate attributes
769         again and again.
770
771         This patch follows the approach taken for collecting ids in selectors, where
772         all the attributes in selectors are added to a HashSet at the time of adding
773         style rules to CSSStyleSelector from StyleSheets and when
774         CSSStyleSelector::hasSelectorForAttribute() is called, the attribute is
775         simply looked up in this pre-populated hash set.
776
777         Test: fast/css/attribute-selector-dynamic-no-elementstyle.html
778
779         * css/CSSStyleSelector.cpp:
780         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
781         (WebCore::CSSStyleSelector::checkSelector):
782         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
783         (WebCore::collectFeaturesFromSelector):
784         (WebCore::CSSStyleSelector::applyProperty):
785         (WebCore::CSSStyleSelector::hasSelectorForAttribute):
786         * css/CSSStyleSelector.h:
787
788 2011-05-25  Ryosuke Niwa  <rniwa@webkit.org>
789
790         Reviewed by James Robinson.
791
792         CSSStyleSelector should provide a way to obtain rules from non-author stylesheets
793         https://bugs.webkit.org/show_bug.cgi?id=61454
794
795         Replaced bool and enum arguments of styleRulesForElement and pseudoStyleRulesForElement
796         by one enum, and provided a way to obtain rules from UA/user stylesheets.
797
798         * css/CSSRule.h: Removed CSSRuleFilter.
799         * css/CSSStyleSelector.cpp:
800         (WebCore::CSSStyleSelector::styleRulesForElement): See above.
801         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Ditto.
802         * css/CSSStyleSelector.h: Moved CSSRuleFilter here.
803         * editing/markup.cpp:
804         (WebCore::styleFromMatchedRulesForElement): Calls styleRulesForElement.
805         * inspector/InspectorCSSAgent.cpp:
806         (WebCore::InspectorCSSAgent::getStylesForNode): Ditto.
807         * page/DOMWindow.cpp:
808         (WebCore::DOMWindow::getMatchedCSSRules): Ditto.
809
810 2011-05-25  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
811
812         Reviewed by Andreas Kling.
813
814         [Qt] JSC bridge: implement __qt_sender__ without using Scope Chain
815         https://bugs.webkit.org/show_bug.cgi?id=61343
816
817         Create a stack to keep track of the sender objects. This is simpler than
818         the similar mechanism in QObject (C++ API), that keeps a stack per-object.
819
820         Since we do not support multiple threads, one static stack will be enough for
821         handling the behavior.
822
823         This behavior is covered by the tst_QWebFrame::connectAndDisconnect() auto test.
824
825         * bridge/qt/qt_instance.cpp:
826         (JSC::Bindings::QtInstance::qtSenderStack):
827         We have one static stack of QObject*. The top of the stack contains the
828         last object that emitted signal that called a JavaScript function.
829
830         * bridge/qt/qt_instance.h:
831         (JSC::Bindings::QtInstance::QtSenderStack::top):
832         (JSC::Bindings::QtInstance::QtSenderStack::push):
833         (JSC::Bindings::QtInstance::QtSenderStack::pop):
834         Minimal functionality to manipulate the sender stack.
835
836         * bridge/qt/qt_runtime.cpp:
837         (JSC::Bindings::QtConnectionObject::execute):
838         Remove the previous code that modified the scope chain. Push the sender object
839         to the stack before calling the JavaScript function (the "slot" in Qt-speak) and
840         pop it afterwards.
841
842 2011-05-25  Sheriff Bot  <webkit.review.bot@gmail.com>
843
844         Unreviewed, rolling out r87257.
845         http://trac.webkit.org/changeset/87257
846         https://bugs.webkit.org/show_bug.cgi?id=61457
847
848         This broke layout tests, see bug 61431. (Requested by
849         hwennborg on #webkit).
850
851         * storage/IDBBackingStore.h:
852         * storage/IDBFactoryBackendImpl.cpp:
853         (WebCore::IDBFactoryBackendImpl::IDBFactoryBackendImpl):
854         (WebCore::IDBFactoryBackendImpl::open):
855         * storage/IDBFactoryBackendImpl.h:
856         * storage/IDBFactoryBackendInterface.h:
857         * storage/IDBLevelDBBackingStore.cpp:
858         * storage/IDBLevelDBBackingStore.h:
859         * storage/IDBSQLiteBackingStore.cpp:
860         * storage/IDBSQLiteBackingStore.h:
861
862 2011-05-25  Alexis Menard  <alexis.menard@openbossa.org>
863
864         Reviewed by Eric Carlson.
865
866         [Qt] Enable usage of QuickTime mediaplayer for the Qt port on Mac.
867         https://bugs.webkit.org/show_bug.cgi?id=61279
868
869         Enable the QuickTime backend for the Qt port on Mac. The patch adds the bits in WebCore
870         to enable the QTKit backend of the Mac port. It can be enabled by passing DEFINES+=USE_QTKIT=1
871         when calling build-webkit.
872
873         * WebCore.pri:
874         * WebCore.pro:
875         * features.pri:
876         * platform/KURL.h:
877         * platform/SharedBuffer.h:
878         * platform/cf/KURLCFNet.cpp:
879         * platform/cf/SharedBufferCF.cpp:
880         * platform/graphics/FloatSize.h:
881         * platform/graphics/IntRect.h:
882         * platform/graphics/IntSize.h:
883         * platform/graphics/MediaPlayer.cpp:
884         * platform/graphics/cg/FloatSizeCG.cpp:
885         * platform/graphics/cg/IntRectCG.cpp:
886         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
887         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
888         (WebCore::MediaPlayerPrivateQTKit::createQTMovieView):
889         (WebCore::MediaPlayerPrivateQTKit::createQTVideoRenderer):
890         (WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer):
891         (WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
892         (WebCore::MediaPlayerPrivateQTKit::paint):
893         (-[WebCoreMovieObserver layerHostChanged:]):
894         * platform/mac/KURLMac.mm:
895         * platform/mac/SharedBufferMac.mm:
896         (+[WebCoreSharedBufferData initialize]):
897         * platform/mac/WebCoreObjCExtras.mm:
898         * platform/qt/WebCoreSystemInterface.h: Added.
899         * platform/qt/WebCoreSystemInterface.mm: Added.
900
901 2011-05-25  Rob Buis  <rbuis@rim.com>
902
903         Reviewed by Eric Seidel.
904         New test rubber-stamped by Dirk Schulze.
905
906         WebKit does not handle missing filter elements correctly
907         https://bugs.webkit.org/show_bug.cgi?id=12569
908
909         Do not render elements that reference non-existant filters.
910
911         Test: svg/W3C-SVG-1.1-SE/filters-felem-01-b.svg
912
913         * rendering/svg/SVGRenderSupport.cpp:
914         (WebCore::SVGRenderSupport::prepareToRenderSVGContent):
915
916 2011-05-25  Nate Chapin  <japhet@chromium.org>
917
918         Reviewed by Adam Barth.
919
920         Put view-source documents in a unique origin and always allow them to run scripts. This ensures tools like
921         XMLViewer work even when scripts are disabled, while still providing the protections expected when scripts are disabled.
922         https://bugs.webkit.org/show_bug.cgi?id=59113
923
924         * bindings/ScriptControllerBase.cpp:
925         (WebCore::ScriptController::canExecuteScripts): Check whether the document is viewing source, and allow scripts in that case.
926         * css/CSSStyleSelector.cpp:
927         (WebCore::CSSStyleSelector::matchUARules):
928         * dom/Document.cpp:
929         (WebCore::Document::Document):
930         (WebCore::Document::setIsViewSource): Renamed from setUsesViewSourceStyles(), set's a unique security origin if we are viewing source.
931         * dom/Document.h:
932         (WebCore::Document::isViewSource): Renamed from usesViewSourceStyles().
933         * html/HTMLViewSourceDocument.cpp:
934         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
935         * loader/FrameLoader.cpp:
936         (WebCore::FrameLoader::receivedFirstData):
937         * xml/XMLTreeViewer.cpp:
938         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
939
940 2011-05-25  Julien Chaffraix  <jchaffraix@codeaurora.org>
941
942         Reviewed by James Robinson.
943
944         http://philip.html5.org/tests/canvas/suite/tests/2d.composite.uncovered.fill.source-in.html fails
945         https://bugs.webkit.org/show_bug.cgi?id=39027
946
947         And:
948
949         - Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.fill.source-out.html
950           https://bugs.webkit.org/show_bug.cgi?id=48295
951
952         - Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.pattern.source-in.html
953           https://bugs.webkit.org/show_bug.cgi?id=48304
954
955         - Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.pattern.source-out.html
956         https://bugs.webkit.org/show_bug.cgi?id=48305
957
958         Those 4 tests have the same root cause for failing. Instead of splitting them in 2 fixes, I squashed
959         them together as the fix is common.
960
961         Based on an older work by Ariya Hidayat.
962
963         * html/canvas/CanvasRenderingContext2D.cpp:
964         (WebCore::CanvasRenderingContext2D::fill):
965         (WebCore::CanvasRenderingContext2D::fillRect): Added call displayTransparencyEverywhere for those 2
966         cases if we have to.
967
968         (WebCore::CanvasRenderingContext2D::shouldDisplayTransparencyEverywhere): This method returns true if
969         the spec says to display transparency everywhere. We only do so for source-in and source-out for now.
970         (WebCore::CanvasRenderingContext2D::displayTransparencyEverywhere): This method implements the spec
971         (which matches other browsers' behavior) and "display transparency elsewhere".
972
973         * html/canvas/CanvasRenderingContext2D.h: Added the two previous methods.
974
975 2011-05-25  Levi Weintraub  <leviw@chromium.org>
976
977         Reviewed by Eric Seidel.
978
979         Add IntPoint versions of IntRect::move and IntPoint::move
980         https://bugs.webkit.org/show_bug.cgi?id=61390
981
982         Adding move methods to IntRect and IntPoint that take an IntPoint
983         that's acting as an offset. Since we also apply negative offsets,
984         also adding a single parameter operator- for IntPoint.
985
986         No new tests since this is refactoring.
987
988         * page/FrameView.cpp:
989         (WebCore::FrameView::invalidateScrollbarRect):
990         (WebCore::FrameView::convertFromRenderer):
991         (WebCore::FrameView::convertToRenderer):
992         * platform/ScrollView.cpp:
993         (WebCore::ScrollView::wheelEvent):
994         * platform/ScrollView.h:
995         (WebCore::ScrollView::convertChildToSelf):
996         (WebCore::ScrollView::convertSelfToChild):
997         * platform/ScrollbarThemeComposite.cpp:
998         (WebCore::ScrollbarThemeComposite::invalidatePart):
999         * platform/graphics/IntPoint.h:
1000         (WebCore::IntPoint::move):
1001         (WebCore::operator-):
1002         * platform/graphics/IntRect.h:
1003         (WebCore::IntRect::move):
1004         * platform/graphics/filters/FilterEffect.cpp:
1005         (WebCore::FilterEffect::requestedRegionOfInputImageData):
1006         * platform/graphics/gpu/Texture.cpp:
1007         (WebCore::Texture::updateSubRect):
1008         * platform/mac/WidgetMac.mm:
1009         (WebCore::Widget::paint):
1010         * rendering/RenderBlock.cpp:
1011         (WebCore::RenderBlock::logicalRectToPhysicalRect):
1012         (WebCore::RenderBlock::selectionGaps):
1013         * rendering/RenderBox.cpp:
1014         (WebCore::RenderBox::offsetFromContainer):
1015         (WebCore::RenderBox::computeRectForRepaint):
1016         (WebCore::RenderBox::localCaretRect):
1017         * rendering/RenderDetailsMarker.cpp:
1018         (WebCore::RenderDetailsMarker::paint):
1019         * rendering/RenderInline.cpp:
1020         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
1021         * rendering/RenderInputSpeech.cpp:
1022         (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
1023         * rendering/RenderLayerBacking.cpp:
1024         (WebCore::paintScrollbar):
1025         (WebCore::RenderLayerBacking::paintContents):
1026         * rendering/RenderLayerCompositor.cpp:
1027         (WebCore::paintScrollbar):
1028         (WebCore::RenderLayerCompositor::paintContents):
1029         * rendering/RenderListItem.cpp:
1030         (WebCore::RenderListItem::positionListMarker):
1031         * rendering/RenderListMarker.cpp:
1032         (WebCore::RenderListMarker::paint):
1033         * rendering/RenderTableCell.cpp:
1034         (WebCore::RenderTableCell::computeRectForRepaint):
1035         * rendering/RenderTextControlSingleLine.cpp:
1036         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
1037         * rendering/RenderView.cpp:
1038         (WebCore::RenderView::repaintViewRectangle):
1039
1040 2011-05-25  Levi Weintraub  <leviw@chromium.org>
1041
1042         Reviewed by Eric Seidel.
1043
1044         Switch addFocusRingRects to use IntPoint
1045         https://bugs.webkit.org/show_bug.cgi?id=60783
1046
1047         Switching addFocusRingRects to use an IntPoint representing the offset being
1048         applied instead of a pair of ints.
1049
1050         No new tests as this is only refactoring.
1051
1052         * platform/graphics/FloatSize.h:
1053         (WebCore::flooredIntPoint):
1054         * rendering/RenderBlock.cpp:
1055         (WebCore::RenderBlock::addFocusRingRects):
1056         * rendering/RenderBlock.h:
1057         * rendering/RenderBox.cpp:
1058         (WebCore::RenderBox::addFocusRingRects):
1059         * rendering/RenderBox.h:
1060         * rendering/RenderInline.cpp:
1061         (WebCore::RenderInline::addFocusRingRects):
1062         * rendering/RenderInline.h:
1063         * rendering/RenderListBox.cpp:
1064         (WebCore::RenderListBox::addFocusRingRects):
1065         * rendering/RenderListBox.h:
1066         * rendering/RenderObject.cpp:
1067         (WebCore::RenderObject::paintFocusRing):
1068         (WebCore::RenderObject::absoluteFocusRingQuads):
1069         * rendering/RenderObject.h:
1070         (WebCore::RenderObject::addFocusRingRects):
1071         * rendering/RenderTextControl.cpp:
1072         (WebCore::RenderTextControl::addFocusRingRects):
1073         * rendering/RenderTextControl.h:
1074         * rendering/RenderTextControlSingleLine.cpp:
1075         (WebCore::RenderTextControlSingleLine::addFocusRingRects):
1076         * rendering/RenderTextControlSingleLine.h:
1077         * rendering/svg/RenderSVGContainer.cpp:
1078         (WebCore::RenderSVGContainer::addFocusRingRects):
1079         * rendering/svg/RenderSVGContainer.h:
1080         * rendering/svg/RenderSVGImage.cpp:
1081         (WebCore::RenderSVGImage::addFocusRingRects):
1082         * rendering/svg/RenderSVGImage.h:
1083         * rendering/svg/RenderSVGPath.cpp:
1084         (WebCore::RenderSVGPath::addFocusRingRects):
1085         * rendering/svg/RenderSVGPath.h:
1086
1087 2011-05-25  Sheriff Bot  <webkit.review.bot@gmail.com>
1088
1089         Unreviewed, rolling out r87229.
1090         http://trac.webkit.org/changeset/87229
1091         https://bugs.webkit.org/show_bug.cgi?id=61445
1092
1093         Lots of tests crashing in
1094         CFNetwork!URLResponse::createFilenameFromResponseHeaders on
1095         Windows XP (Requested by aroben on #webkit).
1096
1097         * platform/network/ResourceResponseBase.cpp:
1098         (WebCore::ResourceResponseBase::adopt):
1099         (WebCore::ResourceResponseBase::suggestedFilename):
1100         (WebCore::ResourceResponseBase::setSuggestedFilename):
1101         (WebCore::ResourceResponseBase::httpStatusText):
1102         (WebCore::ResourceResponseBase::setHTTPStatusText):
1103         (WebCore::ResourceResponseBase::httpHeaderField):
1104         (WebCore::ResourceResponseBase::setHTTPHeaderField):
1105         (WebCore::ResourceResponseBase::httpHeaderFields):
1106         (WebCore::ResourceResponseBase::isAttachment):
1107         (WebCore::ResourceResponseBase::setLastModifiedDate):
1108         (WebCore::ResourceResponseBase::lastModifiedDate):
1109         (WebCore::ResourceResponseBase::wasCached):
1110         (WebCore::ResourceResponseBase::connectionReused):
1111         (WebCore::ResourceResponseBase::setConnectionReused):
1112         (WebCore::ResourceResponseBase::connectionID):
1113         (WebCore::ResourceResponseBase::setConnectionID):
1114         (WebCore::ResourceResponseBase::resourceLoadTiming):
1115         (WebCore::ResourceResponseBase::setResourceLoadTiming):
1116         (WebCore::ResourceResponseBase::resourceLoadInfo):
1117         (WebCore::ResourceResponseBase::setResourceLoadInfo):
1118         * platform/network/ResourceResponseBase.h:
1119         * platform/network/cf/ResourceResponse.h:
1120         (WebCore::ResourceResponse::ResourceResponse):
1121         * platform/network/cf/ResourceResponseCFNet.cpp:
1122         (WebCore::ResourceResponse::platformLazyInit):
1123         * platform/network/mac/ResourceResponseMac.mm:
1124         (WebCore::ResourceResponse::platformLazyInit):
1125
1126 2011-05-25  Igor Oliveira  <igor.oliveira@openbossa.org>
1127
1128         Reviewed by Antonio Gomes.
1129
1130         [Qt] QtWebKit crashes when dragging not loaded images
1131         https://bugs.webkit.org/show_bug.cgi?id=61314
1132
1133         Checks if nativeImageForCurrentFrame is a valid pointer.
1134
1135         Test: http/tests/misc/drag-not-loaded-image.html
1136
1137         * platform/qt/DragImageQt.cpp:
1138         (WebCore::createDragImageFromImage):
1139
1140 2011-05-25  Ryuan Choi  <ryuan.choi@samsung.com>
1141
1142         Reviewed by Xan Lopez.
1143
1144         [GTK] combobox and scrollbar are rendered small size at gtk+2.22.0
1145         https://bugs.webkit.org/show_bug.cgi?id=61436
1146
1147         Fix arguments of gdk_drawable_get_size.
1148
1149         No new tests, no behavior change.
1150
1151         * platform/gtk/GtkVersioning.c:
1152         (getGdkDrawableSize):
1153
1154 2011-05-23  Alexander Pavlov  <apavlov@chromium.org>
1155
1156         Reviewed by Yury Semikhatsky.
1157
1158         Web Inspector: extreme lagging when searching for "img[src*="
1159         https://bugs.webkit.org/show_bug.cgi?id=61282
1160
1161         No new tests, as this is a refactoring: ElementsTreeElement DOM is manipulated directly
1162         when built and search-highlighted, rather than through innerHTML.
1163
1164         * inspector/front-end/DOMSyntaxHighlighter.js:
1165         (WebInspector.DOMSyntaxHighlighter):
1166         (WebInspector.DOMSyntaxHighlighter.prototype.createSpan):
1167         * inspector/front-end/ElementsPanel.js:
1168         (WebInspector.ElementsPanel.prototype._hideSearchHighlights):
1169         * inspector/front-end/ElementsTreeOutline.js:
1170         (WebInspector.ElementsTreeElement.prototype.highlightSearchResults):
1171         (WebInspector.ElementsTreeElement.prototype.hideSearchHighlights):
1172         (WebInspector.ElementsTreeElement.prototype._updateSearchHighlight.updateEntryShow):
1173         (WebInspector.ElementsTreeElement.prototype._updateSearchHighlight.updateEntryHide):
1174         (WebInspector.ElementsTreeElement.prototype._updateSearchHighlight):
1175         (WebInspector.ElementsTreeElement.prototype._addNewAttribute):
1176         (WebInspector.ElementsTreeElement.prototype.updateTitle):
1177         (WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
1178         ():
1179         * inspector/front-end/utilities.js:
1180         ():
1181
1182 2011-05-25  Leandro Gracia Gil  <leandrogracia@chromium.org>
1183
1184         Reviewed by Tony Gentilcore.
1185
1186         Introduce HTML5 track list objects.
1187         https://bugs.webkit.org/show_bug.cgi?id=60184
1188
1189         Introduce the TrackList, MultipleTrackList and ExclusiveTrackList objects
1190         for their use in the MediaStream API and the HTML Media Element.
1191         Current spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#tracklist
1192
1193         The Media Stream API will test this feature in the bug 56587.
1194         More tests related to the HTML Media Element may be added later.
1195
1196         * CMakeLists.txt:
1197         * CodeGenerators.pri:
1198         * DerivedSources.cpp:
1199         * DerivedSources.make:
1200         * GNUmakefile.list.am:
1201         * WebCore.gypi:
1202         * WebCore.pro:
1203         * WebCore.vcproj/WebCore.vcproj:
1204         * WebCore.xcodeproj/project.pbxproj:
1205         * bindings/js/JSEventTarget.cpp:
1206         (WebCore::toJS):
1207         * bindings/v8/V8DOMWrapper.cpp:
1208         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
1209         * dom/DOMAllInOne.cpp:
1210         * dom/EventTarget.cpp:
1211         (WebCore::EventTarget::toTrackList):
1212         (WebCore::EventTarget::toMultipleTrackList):
1213         (WebCore::EventTarget::toExclusiveTrackList):
1214         * dom/EventTarget.h:
1215         * dom/ExclusiveTrackList.cpp: Added.
1216         (WebCore::ExclusiveTrackList::create):
1217         (WebCore::ExclusiveTrackList::ExclusiveTrackList):
1218         (WebCore::ExclusiveTrackList::~ExclusiveTrackList):
1219         (WebCore::ExclusiveTrackList::clear):
1220         (WebCore::ExclusiveTrackList::select):
1221         (WebCore::ExclusiveTrackList::toExclusiveTrackList):
1222         * dom/ExclusiveTrackList.h: Added.
1223         (WebCore::ExclusiveTrackList::selectedIndex):
1224         * dom/ExclusiveTrackList.idl: Added.
1225         * dom/MultipleTrackList.cpp: Added.
1226         (WebCore::MultipleTrackList::create):
1227         (WebCore::MultipleTrackList::MultipleTrackList):
1228         (WebCore::MultipleTrackList::~MultipleTrackList):
1229         (WebCore::MultipleTrackList::clear):
1230         (WebCore::MultipleTrackList::isEnabled):
1231         (WebCore::MultipleTrackList::enable):
1232         (WebCore::MultipleTrackList::disable):
1233         (WebCore::MultipleTrackList::toMultipleTrackList):
1234         * dom/MultipleTrackList.h: Added.
1235         * dom/MultipleTrackList.idl: Added.
1236         * dom/TrackList.cpp: Added.
1237         (WebCore::Track::create):
1238         (WebCore::Track::Track):
1239         (WebCore::TrackList::create):
1240         (WebCore::TrackList::TrackList):
1241         (WebCore::TrackList::~TrackList):
1242         (WebCore::TrackList::length):
1243         (WebCore::TrackList::checkIndex):
1244         (WebCore::TrackList::getID):
1245         (WebCore::TrackList::getKind):
1246         (WebCore::TrackList::getLabel):
1247         (WebCore::TrackList::getLanguage):
1248         (WebCore::TrackList::clear):
1249         (WebCore::TrackList::postChangeEvent):
1250         (WebCore::TrackList::dispatchChangeEvent):
1251         (WebCore::TrackList::toTrackList):
1252         (WebCore::TrackList::scriptExecutionContext):
1253         (WebCore::TrackList::eventTargetData):
1254         (WebCore::TrackList::ensureEventTargetData):
1255         * dom/TrackList.h: Added.
1256         (WebCore::Track::id):
1257         (WebCore::Track::kind):
1258         (WebCore::Track::label):
1259         (WebCore::Track::language):
1260         (WebCore::TrackList::DispatchTask::create):
1261         (WebCore::TrackList::DispatchTask::performTask):
1262         (WebCore::TrackList::DispatchTask::DispatchTask):
1263         (WebCore::TrackList::refEventTarget):
1264         (WebCore::TrackList::derefEventTarget):
1265         * dom/TrackList.idl: Added.
1266
1267 2011-05-25  Keishi Hattori  <keishi@webkit.org>
1268
1269         Reviewed by Kent Tamura.
1270
1271         Move ElementWithPseudoId to separate file
1272         https://bugs.webkit.org/show_bug.cgi?id=61430
1273
1274         No new tests because no behavior changes.
1275
1276         * CMakeLists.txt: Added ElementWithPseudoId.cpp
1277         * GNUmakefile.list.am: Added ElementWithPseudoId.{h,cpp}
1278         * WebCore.gypi: Added ElementWithPseudoId.{h,cpp}
1279         * WebCore.pro: Added ElementWithPseudoId.{h,cpp}
1280         * WebCore.vcproj/WebCore.vcproj: Added ElementWithPseudoId.{h,cpp}
1281         * WebCore.xcodeproj/project.pbxproj: Added ElementWithPseudoId.{h,cpp}
1282         * html/ValidationMessage.cpp: Removed ElementWithPseudoId definition.
1283         * html/shadow/ElementWithPseudoId.cpp: Added.
1284         (WebCore::ElementWithPseudoId::shadowPseudoId):
1285         * html/shadow/ElementWithPseudoId.h: Added.
1286         (WebCore::ElementWithPseudoId::create):
1287         (WebCore::ElementWithPseudoId::ElementWithPseudoId):
1288
1289 2011-05-25  Alexis Menard  <alexis.menard@openbossa.org>
1290
1291         Reviewed by Antonio Gomes.
1292
1293         [Qt] When QWebView has a different style set on it then the scrollbars are not rendered correctly
1294         https://bugs.webkit.org/show_bug.cgi?id=34635
1295
1296         Make sure the scrollbar is properly rendered on Mac with another style than the Mac style. The code had
1297         two paths, one for Mac and one for any other styles. The problem is that on Mac you can still run the
1298         application with -style plastique for example, therefore the code used for other styles should also be
1299         used whenever the current style is not the Mac style.
1300
1301         * platform/qt/ScrollbarThemeQt.cpp:
1302         (WebCore::ScrollbarThemeQt::paint):
1303
1304 2011-05-25  Yuta Kitamura  <yutak@chromium.org>
1305
1306         Reviewed by Kent Tamura.
1307
1308         WebSocket: Use fail() when WebSocketChannel has failed
1309         https://bugs.webkit.org/show_bug.cgi?id=61353
1310
1311         An existing error message has been modified, but it is impossible
1312         to test this message in LayoutTests because it is only shown when
1313         memory allocation has failed, which is hard to reproduce reliably.
1314
1315         One new message has been added. It is covered by an existing test
1316         http/tests/websocket/tests/frame-length-overflow.html.
1317
1318         There is no other change in behavior. No new tests are added.
1319
1320         * websockets/WebSocketChannel.cpp:
1321         (WebCore::WebSocketChannel::fail):
1322         Do not close if we know the socket stream is already closed. This does not
1323         change the behavior, because SocketStreamBase does nothing if it is already
1324         closed.
1325         (WebCore::WebSocketChannel::didOpen):
1326         (WebCore::WebSocketChannel::didReceiveData):
1327         We need to set m_shouldDiscardReceivedData to true before calling fail(),
1328         so I moved the error message from appendToBuffer() to here.
1329         The error message was rephrased in order to improve readability.
1330         (WebCore::WebSocketChannel::appendToBuffer):
1331         Unnested the code.
1332         (WebCore::WebSocketChannel::processBuffer):
1333
1334 2011-05-16  Alexander Pavlov  <apavlov@chromium.org>
1335
1336         Reviewed by David Levin.
1337
1338         CSSParser: m_implicitShorthand should probably be RAII
1339         https://bugs.webkit.org/show_bug.cgi?id=51586
1340
1341         It was impossible to entirely eliminate the m_implicitShorthand manual changes
1342         due to the parseFill*() method stateful call chains.
1343
1344         No new tests, as this is a refactoring.
1345
1346         * css/CSSParser.cpp:
1347         (ImplicitScope::ImplicitScope):
1348         (ImplicitScope::~ImplicitScope):
1349         (WebCore::CSSParser::parseShorthand):
1350         (WebCore::CSSParser::parse4Values):
1351         (WebCore::CSSParser::parseBorderRadius):
1352
1353 2011-05-24  Pavel Podivilov  <podivilov@chromium.org>
1354
1355         Reviewed by Yury Semikhatsky.
1356
1357         Web Inspector: inspected page crashes when call stack is empty after live edit.
1358         https://bugs.webkit.org/show_bug.cgi?id=61364
1359
1360         * bindings/v8/ScriptDebugServer.cpp:
1361         (WebCore::ScriptDebugServer::currentCallFrame):
1362
1363 2011-05-23  Yury Semikhatsky  <yurys@chromium.org>
1364
1365         Reviewed by Adam Barth.
1366
1367         Chromium DevTools: Tab crashes with "Aw, snap!" on entering "(new Image())." in console
1368         https://bugs.webkit.org/show_bug.cgi?id=61194
1369
1370         Test: inspector/console/console-eval-syntax-error.html
1371
1372         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1373         (WebCore::V8InjectedScriptHost::evaluateCallback): return immediately in case of syntax error
1374
1375 2011-05-25  Yuzo Fujishima  <yuzo@google.com>
1376
1377         Reviewed by Kent Tamura.
1378
1379         Fix for Bug 61352 - Refactor RenderView::{enable,disable}LayoutState call sites to use RIIA
1380         https://bugs.webkit.org/show_bug.cgi?id=61352
1381
1382         No new tests because no behavior changes.
1383
1384         * html/shadow/MediaControlElements.cpp:
1385         (WebCore::RenderMediaVolumeSliderContainer::layout):
1386         * page/FrameView.cpp:
1387         (WebCore::FrameView::layout):
1388         * rendering/RenderBlock.cpp:
1389         (WebCore::RenderBlock::repaintOverhangingFloats):
1390         (WebCore::RenderBlock::updateFirstLetter):
1391         * rendering/RenderLayer.cpp:
1392         (WebCore::RenderLayer::updateLayerPositions):
1393         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1394         * rendering/RenderListBox.cpp:
1395         (WebCore::RenderListBox::layout):
1396         * rendering/RenderListItem.cpp:
1397         (WebCore::RenderListItem::updateMarkerLocation):
1398         * rendering/RenderMedia.cpp:
1399         (WebCore::RenderMedia::layout):
1400         * rendering/RenderView.h:
1401         (WebCore::RenderView::disableLayoutState):
1402         (WebCore::RenderView::enableLayoutState):
1403         (WebCore::LayoutStateDisabler::LayoutStateDisabler):
1404         (WebCore::LayoutStateDisabler::~LayoutStateDisabler):
1405         * rendering/svg/RenderSVGRoot.cpp:
1406         (WebCore::RenderSVGRoot::layout):
1407
1408 2011-05-24  Csaba Osztrogon√°c  <ossy@webkit.org>
1409
1410         [Qt] Unreviewed typo fix after r87228.
1411
1412         * WebCore.pro:
1413
1414 2011-05-24  Keishi Hattori  <keishi@webkit.org>
1415
1416         Reviewed by Kent Tamura.
1417
1418         Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
1419         https://bugs.webkit.org/show_bug.cgi?id=61273
1420
1421         Test: fast/forms/color/input-value-sanitization-color.html
1422
1423         * Configurations/FeatureDefines.xcconfig: Added COLOR_INPUT feature flag.
1424         * GNUmakefile.am: Added COLOR_INPUT feature flag.
1425         * features.pri: Added COLOR_INPUT feature flag.
1426         * html/ColorInputType.cpp: Wrapped with COLOR_INPUT feature flag.
1427         (WebCore::ColorInputType::isColorControl): Added.
1428         (WebCore::ColorInputType::fallbackValue): Added. Fallback value defined in spec.
1429         (WebCore::ColorInputType::sanitizeValue): Added. Sanitize value string as defined in spec.
1430         * html/ColorInputType.h: Wrapped with COLOR_INPUT feature flag.
1431         (WebCore::ColorInputType::ColorInputType): Changed to inherit BaseButtonInputType.
1432         * html/InputType.cpp:
1433         (WebCore::InputType::isColorControl): Added.
1434         * html/InputType.h:
1435
1436 2011-05-24  Steve Lacey  <sjl@chromium.org>
1437
1438         Reviewed by Eric Carlson.
1439
1440         Move chromium media controls timeline back to flexible rather than absolute
1441         layout.
1442
1443         https://bugs.webkit.org/show_bug.cgi?id=61379
1444
1445         * css/mediaControlsChromium.css:
1446         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
1447         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
1448
1449 2011-05-24  Fumitoshi Ukai  <ukai@chromium.org>
1450
1451         Unreviewed. Fix clang error.
1452
1453         error: initialization of pointer of type 'WebCore::MHTMLArchive *' to
1454         NULL from a constant boolean expression [-Werror,-Wbool-conversio
1455
1456         * loader/archive/mhtml/MHTMLArchive.cpp:
1457         (WebCore::MHTMLArchive::create):
1458
1459 2011-05-24  Adam Barth  <abarth@webkit.org>
1460
1461         Reviewed by Eric Seidel.
1462
1463         Add FIXME comments about removing FrameLoader::isProcessingUserGesture
1464         https://bugs.webkit.org/show_bug.cgi?id=61395
1465
1466         All the callers of the API are wrong.  They should call the more modern
1467         static member function of ScriptController instead.  I'll remove the
1468         FrameLoader function in a future patch.
1469
1470         * html/HTMLMediaElement.cpp:
1471         (WebCore::HTMLMediaElement::processingUserGesture):
1472         * rendering/RenderFileUploadControl.cpp:
1473         (WebCore::RenderFileUploadControl::click):
1474
1475 2011-05-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1476
1477         Unreviewed. Fix style error.
1478
1479         * platform/efl/WidgetEfl.cpp:
1480         (WebCore::WidgetPrivate::WidgetPrivate):
1481
1482 2011-05-24  Greg Simon  <gregsimon@chromium.org>
1483
1484         Reviewed by Dimitri Glazkov.
1485
1486         Control Indexeddb backends from LayoutTestController
1487         https://bugs.webkit.org/show_bug.cgi?id=61000
1488
1489         Test: storage/indexeddb/migrate-basics.html
1490
1491         * storage/IDBBackingStore.h:
1492         * storage/IDBFactoryBackendImpl.cpp:
1493         (WebCore::IDBFactoryBackendImpl::IDBFactoryBackendImpl):
1494         (WebCore::IDBFactoryBackendImpl::open):
1495         (WebCore::IDBFactoryBackendImpl::setEnableMigration):
1496         (WebCore::IDBFactoryBackendImpl::migrate):
1497         * storage/IDBFactoryBackendImpl.h:
1498         * storage/IDBFactoryBackendInterface.h:
1499         * storage/IDBLevelDBBackingStore.cpp:
1500         (WebCore::IDBLevelDBBackingStore::backingStoreExists):
1501         * storage/IDBLevelDBBackingStore.h:
1502         (WebCore::IDBLevelDBBackingStore::backingStoreType):
1503         * storage/IDBSQLiteBackingStore.cpp:
1504         (WebCore::IDBSQLiteBackingStore::backingStoreExists):
1505         * storage/IDBSQLiteBackingStore.h:
1506         (WebCore::IDBSQLiteBackingStore::backingStoreType):
1507
1508 2011-05-24  Leo Yang  <leo.yang@torchmobile.com.cn>
1509
1510         Reviewed by Ryosuke Niwa.
1511
1512         [SVG] Assertion failure by dragging text between input fields inside <foreignObject>s
1513         https://bugs.webkit.org/show_bug.cgi?id=60692
1514
1515         Add NULL check of 'holder' in WebCore::ReplacementFragment::ReplacementFragment()
1516         before call VisibleSelection::selectionFromContentsOfNode() to prevent crashing.
1517
1518         Test: editing/pasteboard/drag-drop-input-in-svg.svg
1519
1520         * editing/ReplaceSelectionCommand.cpp:
1521         (WebCore::ReplacementFragment::ReplacementFragment):
1522
1523 2011-05-24  Andy Estes  <aestes@apple.com>
1524
1525         Reviewed by Geoffrey Garen.
1526
1527         REGRESSION (r70748): WebKit cannot play QuickTime movies on Mac OS X Wiki Server pages
1528         https://bugs.webkit.org/show_bug.cgi?id=61229
1529
1530         This site-specific hack maintains compatibility with Mac OS X Wiki Server,
1531         which embeds QuickTime movies using an object tag containing QuickTime's
1532         ActiveX classid. Treat this classid as valid only if OS X Server's unique
1533         'generator' meta tag is present. Only apply this quirk if there is no
1534         fallback content, which ensures the quirk will disable itself if Wiki
1535         Server is updated to generate an alternate embed tag as fallback content.
1536
1537         * html/HTMLObjectElement.cpp:
1538         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Return
1539         true if site-specific quirks are enabled, the object element has no
1540         fallback content, the classid attribute matches QuickTime's classid and
1541         the document has a 'generator' meta tag matching Mac OS X Web Services
1542         Server's unique generator string.
1543         (WebCore::HTMLObjectElement::hasValidClassId): Call
1544         shouldAllowQuickTimeClassIdQuirk()
1545         * html/HTMLObjectElement.h:
1546
1547 2011-05-24  Nate Chapin  <japhet@chromium.org>
1548
1549         Reviewed by Adam Barth.
1550
1551         Change CachedResources to take a ResourceRequest instead of
1552         a url in their constructors and provide a very minimal set of
1553         cases for avoiding reusing a CachedResource. The ResourceRequest
1554         part of this change requires pushing responsibility
1555         for calling Document::completeURL() to the caller, instead of
1556         CachedResourceLoader, since ResourceRequest ASSERTs if it
1557         is constructed with an invalid url.
1558
1559         https://bugs.webkit.org/show_bug.cgi?id=61318
1560
1561         Refactor, no new tests.
1562
1563         * css/CSSFontSelector.cpp:
1564         (WebCore::CSSFontSelector::addFontFaceRule):
1565         * css/CSSImageValue.cpp:
1566         (WebCore::CSSImageValue::cachedImage):
1567         * css/CSSImportRule.cpp:
1568         (WebCore::CSSImportRule::insertedIntoParent):
1569         * dom/ProcessingInstruction.cpp:
1570         (WebCore::ProcessingInstruction::checkStyleSheet):
1571         * dom/ScriptElement.cpp:
1572         (WebCore::ScriptElement::requestScript):
1573         * html/HTMLLinkElement.cpp:
1574         (WebCore::HTMLLinkElement::process):
1575         * loader/ImageLoader.cpp:
1576         (WebCore::ImageLoader::updateFromElement):
1577         * loader/cache/CachedCSSStyleSheet.cpp:
1578         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
1579         (WebCore::CachedCSSStyleSheet::didAddClient):
1580         (WebCore::CachedCSSStyleSheet::checkNotify):
1581         * loader/cache/CachedCSSStyleSheet.h:
1582         * loader/cache/CachedFont.cpp:
1583         (WebCore::CachedFont::CachedFont):
1584         * loader/cache/CachedFont.h:
1585         * loader/cache/CachedImage.cpp:
1586         (WebCore::CachedImage::CachedImage):
1587         (WebCore::CachedImage::checkShouldPaintBrokenImage):
1588         * loader/cache/CachedImage.h:
1589         * loader/cache/CachedResource.cpp:
1590         (WebCore::CachedResource::CachedResource):
1591         (WebCore::reuseRequest):
1592         (WebCore::CachedResource::allowReuseOfRequest):
1593         (WebCore::CachedResource::removeClient):
1594         (WebCore::CachedResource::canUseCacheValidator):
1595         * loader/cache/CachedResource.h:
1596         (WebCore::CachedResource::resourceRequest):
1597         (WebCore::CachedResource::url):
1598         * loader/cache/CachedResourceLoader.cpp:
1599         * loader/cache/CachedResourceLoader.h:
1600         * loader/cache/CachedResourceRequest.cpp:
1601         (WebCore::CachedResourceRequest::load):
1602         * loader/cache/CachedScript.cpp:
1603         (WebCore::CachedScript::CachedScript):
1604         * loader/cache/CachedScript.h:
1605         * loader/cache/CachedXSLStyleSheet.cpp:
1606         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
1607         (WebCore::CachedXSLStyleSheet::didAddClient):
1608         (WebCore::CachedXSLStyleSheet::checkNotify):
1609         * loader/cache/CachedXSLStyleSheet.h:
1610         * svg/SVGFEImageElement.cpp:
1611         (WebCore::SVGFEImageElement::requestImageResource):
1612         * svg/SVGFontFaceUriElement.cpp:
1613         (WebCore::SVGFontFaceUriElement::loadFont):
1614         * xml/XSLImportRule.cpp:
1615         (WebCore::XSLImportRule::loadSheet):
1616
1617 2011-05-24  Kent Tamura  <tkent@chromium.org>
1618
1619         Reviewed by Dimitri Glazkov.
1620
1621         Use Element::shadowPseudoId() for text field decoration elements
1622         https://bugs.webkit.org/show_bug.cgi?id=61351
1623
1624         No new tests. Covered by existing tests.
1625
1626         * css/CSSSelector.cpp: Remove support for the following static pseudo selectors:
1627           - -webkit-inner-spin-button
1628           - -webkit-input-speech-button
1629           - -webkit-outer-spin-button
1630           - -webkit-search-cancel-button
1631           - -webkit-search-decoration
1632           - -webkit-search-results-button
1633           - -webkit-search-results-decoration
1634         (WebCore::CSSSelector::pseudoId):
1635         (WebCore::nameToPseudoTypeMap):
1636         (WebCore::CSSSelector::extractPseudoType):
1637         * css/CSSSelector.h: ditto.
1638         * css/CSSStyleSelector.cpp:
1639         (WebCore::CSSStyleSelector::matchRules):
1640           Store shadowPseudoId() result in a local variable because
1641           SearchFieldResultsButtonElement::shadowPseudoId() is a little expensive.
1642         * html/shadow/TextControlInnerElements.cpp:
1643          Override Element::shadowPseudoId() instead of Element::styleForRenderer().
1644         (WebCore::SearchFieldResultsButtonElement::shadowPseudoId):
1645         (WebCore::SearchFieldCancelButtonElement::shadowPseudoId):
1646         (WebCore::SpinButtonElement::shadowPseudoId):
1647         (WebCore::InputFieldSpeechButtonElement::shadowPseudoId):
1648         * html/shadow/TextControlInnerElements.h: Update declarations.
1649         * rendering/RenderTextControlSingleLine.cpp: Remove createFooStyle() functions.
1650         * rendering/RenderTextControlSingleLine.h: ditto.
1651         * rendering/style/RenderStyleConstants.h: Remove unused pseudo IDs.
1652
1653 2011-05-24  Dimitri Glazkov  <dglazkov@chromium.org>
1654
1655         Sorted WebCore.xcodeproj again.
1656
1657         * WebCore.xcodeproj/project.pbxproj: Ran sort-XCode-project-file.
1658
1659 2011-05-24  Stephanie Lewis  <slewis@apple.com>
1660
1661         Reviewed by Geoff Garen.
1662
1663         https://bugs.webkit.org/show_bug.cgi?id=61345
1664         part of <rdar://problem/8675177>
1665         Don't initialize ResourceResponse.m_suggestedFilename until we want to use it.  Initializing it requires reading in and parsing a plist.  
1666         Add new initialization state CommonAndUncommonFields to ResourceResponse.  This will be for all the header fields.
1667         Move suggestedFilename initialization to AllFields so it is never initialized unless we ask for it. 
1668         Add "Content-Type" to common headers since it is looked for by every CSS sheet load.
1669
1670         No new tests because functionality has not changed.
1671
1672         * platform/network/ResourceResponseBase.cpp:
1673         (WebCore::ResourceResponseBase::adopt):
1674         (WebCore::ResourceResponseBase::suggestedFilename):
1675         (WebCore::ResourceResponseBase::setSuggestedFilename):
1676         (WebCore::ResourceResponseBase::httpStatusText):
1677         (WebCore::ResourceResponseBase::setHTTPStatusText):
1678         (WebCore::ResourceResponseBase::httpHeaderField):
1679         (WebCore::ResourceResponseBase::setHTTPHeaderField):
1680         (WebCore::ResourceResponseBase::httpHeaderFields):
1681         (WebCore::ResourceResponseBase::isAttachment):
1682         (WebCore::ResourceResponseBase::setLastModifiedDate):
1683         (WebCore::ResourceResponseBase::lastModifiedDate):
1684         (WebCore::ResourceResponseBase::wasCached):
1685         (WebCore::ResourceResponseBase::connectionReused):
1686         (WebCore::ResourceResponseBase::setConnectionReused):
1687         (WebCore::ResourceResponseBase::connectionID):
1688         (WebCore::ResourceResponseBase::setConnectionID):
1689         (WebCore::ResourceResponseBase::resourceLoadTiming):
1690         (WebCore::ResourceResponseBase::setResourceLoadTiming):
1691         (WebCore::ResourceResponseBase::resourceLoadInfo):
1692         (WebCore::ResourceResponseBase::setResourceLoadInfo):
1693         * platform/network/ResourceResponseBase.h:
1694         * platform/network/cf/ResourceResponse.h:
1695         (WebCore::ResourceResponse::ResourceResponse):
1696         * platform/network/cf/ResourceResponseCFNet.cpp:
1697         (WebCore::ResourceResponse::platformLazyInit):
1698         * platform/network/mac/ResourceResponseMac.mm:
1699         (WebCore::ResourceResponse::platformLazyInit):
1700
1701 2011-05-24  Michael Saboff  <msaboff@apple.com>
1702
1703         Reviewed by Geoffrey Garen.
1704
1705         Improve handling in WebCore of low memory situations
1706         https://bugs.webkit.org/show_bug.cgi?id=61222
1707
1708         Added new class, MemoryPressureHandler, to platform to respond to low
1709         system memory events. Added Mac specific implementation that reduces the
1710         page cache, NSURL cache, WebCore cache by half their current usage
1711         and then garbage collects.  This can allow Safari to continue operating
1712         in a low memory situation with minimal paging.
1713         Split up prune operations in MemoryCache to allow for pruning to a
1714         specific actual size to support this change.
1715
1716         No tests added as the functionality of WebKit wasn't changed.
1717
1718         * GNUmakefile.list.am:
1719         * WebCore.exp.in:
1720         * WebCore.gypi:
1721         * WebCore.pro:
1722         * WebCore.vcproj/WebCore.vcproj:
1723         * WebCore.xcodeproj/project.pbxproj:
1724         * loader/cache/MemoryCache.cpp:
1725         (WebCore::MemoryCache::pruneLiveResources):
1726         (WebCore::MemoryCache::forcePruneLiveResources):
1727         (WebCore::MemoryCache::pruneLiveResourcesToTarget):
1728         (WebCore::MemoryCache::pruneDeadResources):
1729         (WebCore::MemoryCache::forcePruneDeadResources):
1730         (WebCore::MemoryCache::pruneDeadResourcesToTarget):
1731         * loader/cache/MemoryCache.h:
1732         (WebCore::MemoryCache::forcePrune):
1733         * platform/MemoryPressureHandler.cpp: Added.
1734         (WebCore::memoryPressureHandler):
1735         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
1736         (WebCore::MemoryPressureHandler::install):
1737         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1738         * platform/MemoryPressureHandler.h: Added.
1739         * platform/mac/MemoryPressureHandler.mm: Added.
1740         (WebCore::MemoryPressureHandler::install):
1741         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1742
1743 2011-05-24  Kent Tamura  <tkent@chromium.org>
1744
1745         Reviewed by Dimitri Glazkov.
1746
1747         Node::shadowAncestorNode() and shadowTreeRootNode() should be const.
1748         https://bugs.webkit.org/show_bug.cgi?id=61398
1749
1750         shadowAncestorNode() and shadowTreeRootNode() should be const
1751         though they can return 'this' pointer.
1752
1753         No new tests. This doesn't change any visible behavior.
1754
1755         * dom/Node.cpp:
1756         (WebCore::Node::shadowAncestorNode): Make this const.
1757         (WebCore::Node::shadowTreeRootNode): ditto.
1758         * dom/Node.h: Update declarations.
1759         * html/shadow/TextControlInnerElements.h:
1760         (WebCore::SpinButtonElement::isEnabledFormControl): Need no const_cast<>.
1761         (WebCore::SpinButtonElement::isReadOnlyFormControl): ditto.
1762
1763 2011-05-24  James Simonsen  <simonjam@chromium.org>
1764
1765         Reviewed by Eric Seidel.
1766
1767         ASSERT_NOT_REACHED reached with broken ideograph and system fallback
1768         https://bugs.webkit.org/show_bug.cgi?id=53528
1769
1770         Test: fast/text/justify-ideograph-vertical.html (on chromium linux)
1771
1772         * platform/graphics/FontFastPath.cpp:
1773         (WebCore::Font::glyphDataForCharacter): Identify and handle broken ideographs as any other variant.
1774         * platform/graphics/SimpleFontData.h:
1775         (WebCore::SimpleFontData::variantFontData): Added BrokenIdeographVariant.
1776
1777 2011-05-24  Syed Idris Shah  <syed.idris-shah@nokia.com>
1778
1779         Reviewed by Andreas Kling.
1780
1781         [Qt] fast/canvas/webgl/gl-uniform-arrays.html failing for Qt on Linux
1782         https://bugs.webkit.org/show_bug.cgi?id=60377 
1783
1784         LayoutTests/fast/canvas/webgl/gl-uniform-arrays.html
1785
1786         We do not need assert for the useProgram as program can be null.
1787
1788         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1789         (WebCore::GraphicsContext3D::useProgram): Program can be null. Removing assert.
1790
1791 2011-05-24  Ryosuke Niwa  <rniwa@webkit.org>
1792
1793         Reviewed by Darin Adler.
1794
1795         Undo gets broken in contenteditable area when a text field's value is set by script
1796         https://bugs.webkit.org/show_bug.cgi?id=61340
1797
1798         The bug was caused by RenderTextControl::setInnerTextValue's clearing undo stack by
1799         calling clearUndoRedoOperations whenever script sets new value to input or textarea.
1800
1801         Fixed the bug by removing the offending call to clearUndoRedoOperations. While this call
1802         was added by r15565 to fix a crash, SimpleEditCommands have since become much more robust
1803         and the test added by r15565 (fast/forms/text-field-setvalue-crash.html) still passes.
1804
1805         Test: editing/undo/undo-after-setting-value.html
1806
1807         * rendering/RenderTextControl.cpp:
1808         (WebCore::RenderTextControl::setInnerTextValue):
1809
1810 2011-05-24  Dan Bernstein  <mitz@apple.com>
1811
1812         Reviewed by Dave Hyatt.
1813
1814         Move code to discover if a CTFont has vertical glyphs out of SimpleFontData::platformInit()
1815         https://bugs.webkit.org/show_bug.cgi?id=61392
1816
1817         * platform/graphics/mac/SimpleFontDataMac.mm:
1818         (WebCore::fontHasVerticalGlyphs): Moved code here...
1819         (WebCore::SimpleFontData::platformInit): ...from here.
1820
1821 2011-05-24  Kenneth Russell  <kbr@google.com>
1822
1823         Reviewed by James Robinson.
1824
1825         Implement Float64Array
1826         https://bugs.webkit.org/show_bug.cgi?id=39144
1827
1828         Implemented Float64Array based on the existing Float32Array sources.
1829         Built and tested in Chromium on Linux and Mac OS X and Safari on Mac OS X.
1830
1831         * CMakeLists.txt:
1832         * CodeGenerators.pri:
1833         * DerivedSources.cpp:
1834         * DerivedSources.make:
1835         * GNUmakefile.list.am:
1836         * UseJSC.cmake:
1837         * WebCore.gypi:
1838         * WebCore.pro:
1839         * WebCore.vcproj/WebCore.vcproj:
1840         * WebCore.xcodeproj/project.pbxproj:
1841         * bindings/js/JSBindingsAllInOne.cpp:
1842         * bindings/js/JSDOMWindowCustom.cpp:
1843         (WebCore::JSDOMWindow::float64Array):
1844         * bindings/js/JSFloat64ArrayCustom.cpp: Added.
1845         (WebCore::JSFloat64Array::indexSetter):
1846         (WebCore::toJS):
1847         (WebCore::JSFloat64Array::set):
1848         (WebCore::JSFloat64ArrayConstructor::constructJSFloat64Array):
1849         * bindings/v8/custom/V8Float64ArrayCustom.cpp: Added.
1850         (WebCore::V8Float64Array::constructorCallback):
1851         (WebCore::V8Float64Array::setCallback):
1852         (WebCore::toV8):
1853         * html/canvas/ArrayBufferView.h:
1854         (WebCore::ArrayBufferView::isDoubleArray):
1855         * html/canvas/Float64Array.cpp: Added.
1856         (WebCore::Float64Array::create):
1857         (WebCore::Float64Array::Float64Array):
1858         (WebCore::Float64Array::subarray):
1859         * html/canvas/Float64Array.h: Added.
1860         (WebCore::Float64Array::set):
1861         (WebCore::Float64Array::item):
1862         (WebCore::Float64Array::isDoubleArray):
1863         * html/canvas/Float64Array.idl: Added.
1864         * page/DOMWindow.idl:
1865         * workers/WorkerContext.idl:
1866
1867 2011-05-24  Simon Fraser  <simon.fraser@apple.com>
1868
1869         Reviewed by Chris Marrin.
1870
1871         Add ability to set compositing layer bounds origin
1872         https://bugs.webkit.org/show_bug.cgi?id=61381
1873
1874         On Core Animation layers, the origin of the bounds
1875         rectangle affects where layer content is rendered, as well
1876         as the offset of sublayers. Currently we always set the
1877         bounds offset to a zero point, but may need to make use
1878         of the bounds offset in future, so expose it via GraphicsLayer.
1879
1880         * platform/graphics/GraphicsLayer.h:
1881         (WebCore::GraphicsLayer::boundsOrigin):
1882         (WebCore::GraphicsLayer::setBoundsOrigin):
1883         * platform/graphics/ca/GraphicsLayerCA.cpp:
1884         (WebCore::GraphicsLayerCA::setSize):
1885         (WebCore::GraphicsLayerCA::setBoundsOrigin):
1886         (WebCore::GraphicsLayerCA::setAllowTiledLayer):
1887         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1888         (WebCore::GraphicsLayerCA::updateBounds):
1889         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
1890         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
1891         * platform/graphics/ca/GraphicsLayerCA.h:
1892
1893 2011-05-24  Leandro Pereira  <leandro@profusion.mobi>
1894
1895         [EFL] Build fix.
1896
1897         * CMakeLists.txt: Also build platform/network/ContentTypeParser.cpp,
1898         added by r86289.
1899
1900 2011-05-24  Leandro Pereira  <leandro@profusion.mobi>
1901
1902         [EFL] Build fix.
1903
1904         * bridge/runtime_root.cpp: Include <heap/Weak.h> instead of
1905         <JavaScriptCore/Weak.h>.
1906
1907 2011-05-24  Jay Civelli  <jcivelli@chromium.org>
1908
1909         Reviewed by Adam Barth.
1910
1911         Adding MHTML reading support. That required some basic MIME header parsing.
1912         Modified DocumentLoader to keep a reference to the currently Archive loaded,
1913         so we can have different policies for loading subresources depending on the
1914         archive type.
1915         https://bugs.webkit.org/show_bug.cgi?id=7168
1916
1917         * CMakeLists.txt:
1918         * Configurations/FeatureDefines.xcconfig:
1919         * GNUmakefile.am:
1920         * GNUmakefile.list.am:
1921         * WebCore.gyp/WebCore.gyp:
1922         * WebCore.gypi:
1923         * WebCore.pro:
1924         * WebCore.vcproj/WebCore.vcproj:
1925         * WebCore.xcodeproj/project.pbxproj:
1926         * features.pri:
1927         * loader/DocumentLoader.cpp:
1928         (WebCore::DocumentLoader::commitLoad):
1929         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
1930         (WebCore::DocumentLoader::popArchiveForSubframe):
1931         (WebCore::DocumentLoader::scheduleArchiveLoad):
1932         * loader/DocumentLoader.h:
1933         * loader/FrameLoader.cpp:
1934         (WebCore::FrameLoader::loadURLIntoChildFrame):
1935         (WebCore::FrameLoader::loadArchive):
1936         (WebCore::FrameLoader::stopAllLoaders):
1937         (WebCore::FrameLoader::finishedLoadingDocument):
1938         * loader/FrameLoader.h:
1939         (WebCore::FrameLoader::archive):
1940         * loader/MainResourceLoader.cpp:
1941         (WebCore::MainResourceLoader::continueAfterContentPolicy):
1942         * loader/ResourceLoader.cpp:
1943         (WebCore::ResourceLoader::start):
1944         * loader/archive/Archive.cpp: Added.
1945         * loader/archive/Archive.h:
1946         (WebCore::Archive::mainResource):
1947         * loader/archive/ArchiveFactory.cpp:
1948         (WebCore::archiveFactoryCreate):
1949         (WebCore::archiveMIMETypes):
1950         (WebCore::ArchiveFactory::create):
1951         (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
1952         * loader/archive/ArchiveFactory.h:
1953         * loader/archive/ArchiveResourceCollection.cpp:
1954         (WebCore::ArchiveResourceCollection::addAllResources):
1955         (WebCore::ArchiveResourceCollection::popSubframeArchive):
1956         * loader/archive/ArchiveResourceCollection.h:
1957         * loader/archive/cf/LegacyWebArchive.cpp:
1958         (WebCore::LegacyWebArchive::create):
1959         (WebCore::LegacyWebArchive::type):
1960         * loader/archive/cf/LegacyWebArchive.h:
1961         * loader/archive/mhtml/MHTMLArchive.cpp: Added.
1962         * loader/archive/mhtml/MHTMLArchive.h: Added.
1963         * loader/archive/mhtml/MHTMLParser.cpp: Added.
1964         * loader/archive/mhtml/MHTMLParser.h: Added.
1965         * platform/MIMETypeRegistry.cpp:
1966         (WebCore::initializeSupportedNonImageMimeTypes):
1967         * platform/mac/PasteboardMac.mm:
1968         (WebCore::Pasteboard::documentFragment):
1969         * platform/network/MIMEHeader.cpp: Added.
1970         * platform/network/MIMEHeader.h: Added.
1971
1972 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1973
1974         Try to fix some builds: #include Weak.h for Weak<T>.
1975
1976         * bridge/runtime_root.h:
1977
1978 2011-05-24  Sam Weinig  <sam@webkit.org>
1979
1980         Reviewed by Beth Dakin.
1981
1982         Can't scroll scaled page that has overflow:hidden on its root
1983         <rdar://problem/9029189>
1984         https://bugs.webkit.org/show_bug.cgi?id=61339
1985
1986         Test: fast/events/scroll-in-scaled-page-with-overflow-hidden.html
1987
1988         * page/FrameView.cpp:
1989         (WebCore::FrameView::applyOverflowToViewport):
1990         Scrollbars should be enabled for the viewport when scaled, even if overflow:hidden
1991         is specified.
1992
1993 2011-05-24  Adam Roben  <aroben@apple.com>
1994
1995         Leopard build fix
1996
1997         * bridge/runtime_root.cpp: Added a missing #include.
1998
1999 2011-05-24  Jian Li  <jianli@chromium.org>
2000
2001         Reviewed by Kenneth Russell.
2002
2003         Make start parameter of Blob.slice optional.
2004         https://bugs.webkit.org/show_bug.cgi?id=59628
2005
2006         The start parameter should be optional per the latest FILE API
2007         spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob.
2008
2009         * fileapi/Blob.h:
2010         * fileapi/Blob.idl: Make start parameter optional.
2011
2012 2011-05-24  Adam Roben  <aroben@apple.com>
2013
2014         Invalidate RuntimeObjects when they are finalized
2015
2016         This will cause the underlying NPObject to be released at finalization time, rather than at
2017         destruction time (which is unpredictable and could occur after the plugin has been
2018         unloaded).
2019
2020         Test: plugins/npobject-js-wrapper-destroyed-after-plugin-unload.html
2021
2022         Fixes <http://webkit.org/b/61317> <rdar://problem/9489829> Crash in _NPN_DeallocateObject
2023         when reloading yahoo.com webarchive in WebKit1
2024
2025         Reviewed by Oliver Hunt.
2026
2027         * bridge/runtime_object.cpp:
2028         (JSC::Bindings::RuntimeObject::~RuntimeObject): Assert that we've already been invalidated.
2029
2030         * bridge/runtime_root.cpp:
2031         (JSC::Bindings::RootObject::invalidate):
2032         (JSC::Bindings::RootObject::addRuntimeObject):
2033         Updated for m_runtimeObjects type change.
2034
2035         (JSC::Bindings::RootObject::finalize): Added. Invalidates the RuntimeObject and removes it
2036         from the map.
2037
2038         * bridge/runtime_root.h: Now inherits from WeakHandleOwner.
2039         Changed m_runtimeObjects from a WeakGCMap to a HashMap of JSC::Weak objects so that we will
2040         be notified when the RuntimeObjects are finalized.
2041
2042 2011-05-24  Mike Reed  <reed@google.com>
2043
2044         Reviewed by Kenneth Russell.
2045
2046         skia: fix stroking of zero-height rectangles
2047         https://bugs.webkit.org/show_bug.cgi?id=61284
2048
2049         Tests: canvas/philip/tests/2d.line.miter.lineedge.html
2050                canvas/philip/tests/2d.strokeRect.zero.4.html
2051
2052         * platform/graphics/skia/GraphicsContextSkia.cpp:
2053         (WebCore::GraphicsContext::strokeRect):
2054
2055 2011-05-24  Zan Dobersek  <zandobersek@gmail.com> and Philippe Normand  <pnormand@igalia.com>
2056
2057         Reviewed by Kenneth Russell.
2058
2059         Enable FloatArray usage outside WebGL guards
2060         https://bugs.webkit.org/show_bug.cgi?id=61356
2061
2062         * webaudio/AudioBuffer.cpp:
2063         * webaudio/AudioBuffer.idl:
2064         * webaudio/RealtimeAnalyser.cpp:
2065         * webaudio/RealtimeAnalyser.h:
2066         * webaudio/RealtimeAnalyserNode.h:
2067         * webaudio/RealtimeAnalyserNode.idl:
2068
2069 2011-05-24  Adam Klein  <adamk@chromium.org>
2070
2071         Unreviewed, rolling out r87145.
2072         http://trac.webkit.org/changeset/87145
2073         https://bugs.webkit.org/show_bug.cgi?id=61194
2074
2075         Regression in LayoutTests/inspector/debugger/scripts-panel.html on Chromium Win & Linux.
2076
2077         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2078         (WebCore::V8InjectedScriptHost::evaluateCallback):
2079
2080 2011-05-24  Matthew Delaney  <mdelaney@apple.com>
2081
2082         Reviewed by Simon Fraser.
2083
2084         Clamp coordinates to integers for canvas create/getImageData routines
2085         https://bugs.webkit.org/show_bug.cgi?id=61135
2086
2087         Test: fast/canvas/canvas-getImageData-largeNonintegralDimensions.html
2088
2089         * html/HTMLCanvasElement.cpp:
2090         (WebCore::HTMLCanvasElement::convertLogicalToDevice): clamp to ints
2091         * html/canvas/CanvasRenderingContext2D.cpp:
2092         (WebCore::CanvasRenderingContext2D::createImageData):
2093         (WebCore::CanvasRenderingContext2D::getImageData):
2094         * platform/graphics/cg/ImageBufferDataCG.cpp:
2095         (WebCore::ImageBufferData::getData):
2096
2097 2011-05-24  Robin Dunn  <robin@alldunn.com>
2098
2099         Reviewed by Kevin Ollivier.
2100
2101         [wx] Make sure x and y adjustments are applied to all operations, and fix the calculations
2102         for the height and width checks to take into account x and y offsets.
2103         
2104         https://bugs.webkit.org/show_bug.cgi?id=61367
2105
2106         * platform/graphics/wx/ImageWx.cpp:
2107         (WebCore::Image::drawPattern):
2108
2109 2011-05-24  Tony Chang  <tony@chromium.org>
2110
2111         Reviewed by James Robinson.
2112
2113         fix render overflow computation for input type=range
2114         https://bugs.webkit.org/show_bug.cgi?id=61132
2115
2116         Test: fast/forms/slider-hit-testing.html
2117
2118         We need to clear m_overflow otherwise we use the first
2119         size of the slider for hit testing (i.e., changes to the size
2120         cause problems).  This only shows up if the thumb isn't contained
2121         in the bounds of the slider.  Making the range have a smaller height
2122         than the thumb shows the bug.
2123
2124         * rendering/RenderSlider.cpp:
2125         (WebCore::RenderSlider::layout): Clear the overflow during layout
2126             so we re-compute the overflow based on the current size of the
2127             slider.
2128
2129 2011-05-24  Alok Priyadarshi  <alokp@chromium.org>
2130
2131         Reviewed by James Robinson.
2132
2133         Enable skia gpu rendering for content layers
2134         https://bugs.webkit.org/show_bug.cgi?id=56749
2135
2136         This patch adds gpu accelerated rendering for content and root layers.
2137         Layer textures are updated in two stages:
2138         1. Paint: The non-accelerated path paints the layer contents into a bitmap.
2139                   The accelerated path paints into an SkPicture, which is essentially a display list.
2140         2. Upload: The non-accelerated path uploads the pixels obtained in the first stage to a texture.
2141                    The accelerated path renders the picture directly into the texture.
2142
2143         The accelerated path can be enabled by --enable-accelerated-drawing command-line flag in chromium.
2144         Note that this patch does not accelerate the CG path on mac. We have two options here - use skia or accelrate CG path.
2145         Any bugs should be caught by layout tests.
2146
2147         * platform/graphics/chromium/ContentLayerChromium.cpp:
2148         (WebCore::ContentLayerChromium::createTextureUpdater):
2149         * platform/graphics/chromium/LayerRendererChromium.cpp:
2150         (WebCore::LayerRendererChromium::create):
2151         (WebCore::LayerRendererChromium::LayerRendererChromium):
2152         (WebCore::LayerRendererChromium::skiaContext):
2153         (WebCore::LayerRendererChromium::updateAndDrawLayers):
2154         (WebCore::LayerRendererChromium::createRootLayerTextureUpdater):
2155         * platform/graphics/chromium/LayerRendererChromium.h:
2156         (WebCore::LayerRendererChromium::acceleratedDrawing):
2157         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
2158         (WebCore::LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture):
2159         (WebCore::LayerTextureUpdaterSkPicture::~LayerTextureUpdaterSkPicture):
2160         (WebCore::LayerTextureUpdaterSkPicture::prepareToUpdate):
2161         (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
2162         (WebCore::LayerTextureUpdaterSkPicture::deleteFrameBuffer):
2163         (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer):
2164         (WebCore::LayerTextureUpdaterSkPicture::clearFrameBuffer):
2165         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
2166         (WebCore::LayerTextureUpdaterSkPicture::orientation):
2167         * platform/graphics/chromium/LayerTilerChromium.cpp:
2168         (WebCore::LayerTilerChromium::updateRect):
2169         (WebCore::LayerTilerChromium::draw):
2170
2171 2011-05-24  Pavel Podivilov  <podivilov@chromium.org>
2172
2173         Reviewed by Yury Semikhatsky.
2174
2175         Web Inspector: display keyboard shortcuts in scripts panel sidebar buttons tooltip text.
2176         https://bugs.webkit.org/show_bug.cgi?id=61358
2177
2178         * English.lproj/localizedStrings.js:
2179         * inspector/front-end/CallStackSidebarPane.js:
2180         (WebInspector.CallStackSidebarPane.prototype._selectedPlacardByIndex):
2181         (WebInspector.CallStackSidebarPane.prototype.registerShortcuts):
2182         * inspector/front-end/Panel.js:
2183         (WebInspector.Panel.prototype.registerShortcut):
2184         * inspector/front-end/ScriptsPanel.js:
2185         (WebInspector.ScriptsPanel):
2186         (WebInspector.ScriptsPanel.prototype._createSidebarButtons):
2187         (WebInspector.ScriptsPanel.prototype._createSidebarButtonAndRegisterShortcuts):
2188
2189 2011-05-24  Philippe Normand  <pnormand@igalia.com>
2190
2191         Reviewed by Andres Kling.
2192
2193         JSAudioContextCustom doesn't encode errors
2194         https://bugs.webkit.org/show_bug.cgi?id=61357
2195
2196         Fix AudioContext return values
2197
2198         * bindings/js/JSAudioContextCustom.cpp:
2199         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
2200
2201 2011-05-24  Rob Buis  <rbuis@rim.com>
2202
2203         Rubber-stamped by Dirk Schulze.
2204
2205         Remove requiresLayer inlines, already provided by RenderSVGModelObject.
2206
2207         * rendering/svg/RenderSVGHiddenContainer.h:
2208         (WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
2209         * rendering/svg/RenderSVGImage.h:
2210
2211 2011-05-24  Nikolas Zimmermann  <nzimmermann@rim.com>
2212
2213         Not reviewed, build fix.
2214
2215         Remove platform layering violation: TextRun stores RenderObjects for SVG Fonts support
2216         https://bugs.webkit.org/show_bug.cgi?id=60254
2217
2218         Forgot to rename the destructor.
2219
2220         * platform/graphics/SimpleFontData.h:
2221         (WebCore::SimpleFontData::AdditionalFontData::~AdditionalFontData):
2222
2223 2011-05-24  Nikolas Zimmermann  <nzimmermann@rim.com>
2224
2225         Not reviewed, build fix.
2226
2227         Remove platform layering violation: TextRun stores RenderObjects for SVG Fonts support
2228         https://bugs.webkit.org/show_bug.cgi?id=60254
2229
2230         Rename SimpleFontData::FontData subclass to AdditionalFontData, to avoid clashes with the WebCore::FontData class, which breaks the win build.
2231
2232         * platform/graphics/SimpleFontData.cpp:
2233         (WebCore::SimpleFontData::SimpleFontData):
2234         * platform/graphics/SimpleFontData.h:
2235         (WebCore::SimpleFontData::fontData):
2236         * svg/SVGFontData.h:
2237
2238 2011-05-24  Nikolas Zimmermann  <nzimmermann@rim.com>
2239
2240         Reviewed by Antti Koivisto.
2241
2242         Remove platform layering violation: TextRun stores RenderObjects for SVG Fonts support
2243         https://bugs.webkit.org/show_bug.cgi?id=60254
2244
2245         First part:
2246         Remove a long-standing layering violation in TextRun: it stores RenderObject/RenderSVGResource pointers for SVG Fonts support.
2247         Replace the two Render* pointers with a single RefPtr<AbstractRenderingContext>. AbstractRenderingContext is a helper class,
2248         that can be derived from in order to associate additional data with a TextRun. This effectively reduces the memory consumption of TextRun.
2249
2250         Introduce rendering/TextRunRenderingContext.h, which inherits from TextRun::AbstractRenderingContext and holds additional data.
2251         If the primary font in use is a SVG Font then allocate a TextRunRenderingContext object and store it in the RefPtr<AbstractRenderingContext>
2252         in TextRun. If the primary font is not a SVG Font, don't even allocate the TextRunRenderingContext structure, as we won't need the context data.
2253         SVG Fonts glyph matching only works within a context, so we need access to the RenderObject that's drawing the text.
2254
2255         This is the main preparation patch for the SVG Fonts rewrite, that will allow us to share the simple text code path for SVG Fonts as well,
2256         making all CSS text properties work for HTML text using SVG Fonts, and allows proper integration within the GlyphPage concept. Soon
2257         we can intermix WOFF/SVG & native fonts, within segment font declarations.
2258
2259         Second part:
2260         Remove a long-standing layering violation in SimpleFontData: it stores SVGFontData objects, that are living in svg/.
2261         Use the same concept as above, introduce SimpleFontData::AbstractFontData, and let SVGFontData inherit from AbstractFontData and extent it.
2262         If SVG Fonts are used, CSSFontFaceSource will create a SVGFontData object and pass it as PassOwnPtr<AbstractFontData> to SimpleFontData.
2263
2264         All layering violations are gone now, SVG Fonts are cleanly integrated now.
2265         Doesn't affect any tests yet, refactoring only.
2266
2267         * CMakeLists.txt:
2268         * GNUmakefile.list.am:
2269         * WebCore.gypi:
2270         * WebCore.pro:
2271         * WebCore.vcproj/WebCore.vcproj:
2272         * WebCore.xcodeproj/project.pbxproj:
2273         * css/CSSFontFaceSource.cpp:
2274         (WebCore::CSSFontFaceSource::getFontData):
2275         * platform/graphics/Font.cpp:
2276         (WebCore::Font::drawText):
2277         (WebCore::Font::width):
2278         (WebCore::Font::selectionRectForText):
2279         (WebCore::Font::offsetForPosition):
2280         * platform/graphics/Font.h:
2281         * platform/graphics/SimpleFontData.cpp:
2282         (WebCore::SimpleFontData::SimpleFontData):
2283         (WebCore::SimpleFontData::~SimpleFontData):
2284         * platform/graphics/SimpleFontData.h:
2285         (WebCore::SimpleFontData::FontData::~FontData):
2286         (WebCore::SimpleFontData::fontMetrics):
2287         (WebCore::SimpleFontData::setMaxCharWidth):
2288         (WebCore::SimpleFontData::setAvgCharWidth):
2289         (WebCore::SimpleFontData::setSpaceWidth):
2290         (WebCore::SimpleFontData::setSpaceGlyph):
2291         (WebCore::SimpleFontData::setZeroWidthSpaceGlyph):
2292         (WebCore::SimpleFontData::fontData):
2293         (WebCore::SimpleFontData::isSVGFont):
2294         (WebCore::SimpleFontData::setMissingGlyphData):
2295         * platform/graphics/TextRun.h:
2296         (WebCore::TextRun::TextRun):
2297         (WebCore::TextRun::setAllowTabs):
2298         (WebCore::TextRun::setXPos):
2299         (WebCore::TextRun::RenderingContext::~RenderingContext):
2300         (WebCore::TextRun::renderingContext):
2301         (WebCore::TextRun::setRenderingContext):
2302         * rendering/EllipsisBox.cpp:
2303         (WebCore::EllipsisBox::paint):
2304         (WebCore::EllipsisBox::selectionRect):
2305         (WebCore::EllipsisBox::paintSelection):
2306         * rendering/InlineTextBox.cpp:
2307         (WebCore::InlineTextBox::selectionRect):
2308         (WebCore::InlineTextBox::paint):
2309         (WebCore::InlineTextBox::paintSelection):
2310         (WebCore::InlineTextBox::paintCompositionBackground):
2311         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
2312         (WebCore::InlineTextBox::paintTextMatchMarker):
2313         (WebCore::InlineTextBox::computeRectForReplacementMarker):
2314         (WebCore::InlineTextBox::offsetForPosition):
2315         (WebCore::InlineTextBox::positionForOffset):
2316         (WebCore::InlineTextBox::constructTextRun):
2317         * rendering/InlineTextBox.h:
2318         * rendering/RenderBlock.cpp:
2319         (WebCore::stripTrailingSpace):
2320         (WebCore::RenderBlock::constructTextRun):
2321         * rendering/RenderBlock.h:
2322         * rendering/RenderBlockLineLayout.cpp:
2323         (WebCore::setLogicalWidthForTextRun):
2324         (WebCore::textWidth):
2325         (WebCore::tryHyphenating):
2326         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
2327         (WebCore::RenderBlock::checkLinesForTextOverflow):
2328         * rendering/RenderCombineText.cpp:
2329         (WebCore::RenderCombineText::combineText):
2330         * rendering/RenderFileUploadControl.cpp:
2331         (WebCore::RenderFileUploadControl::paintObject):
2332         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
2333         * rendering/RenderFlexibleBox.cpp:
2334         (WebCore::RenderFlexibleBox::applyLineClamp):
2335         * rendering/RenderImage.cpp:
2336         (WebCore::RenderImage::setImageSizeForAltText):
2337         (WebCore::RenderImage::paintReplaced):
2338         * rendering/RenderListBox.cpp:
2339         (WebCore::RenderListBox::updateFromElement):
2340         * rendering/RenderListMarker.cpp:
2341         (WebCore::RenderListMarker::paint):
2342         (WebCore::RenderListMarker::computePreferredLogicalWidths):
2343         (WebCore::RenderListMarker::getRelativeMarkerRect):
2344         * rendering/RenderText.cpp:
2345         (WebCore::RenderText::widthFromCache):
2346         (WebCore::RenderText::trimmedPrefWidths):
2347         (WebCore::RenderText::computePreferredLogicalWidths):
2348         (WebCore::RenderText::width):
2349         * rendering/RenderTextControl.cpp:
2350         (WebCore::RenderTextControl::getAvgCharWidth):
2351         * rendering/svg/RenderSVGAllInOne.cpp:
2352         * rendering/svg/SVGInlineTextBox.cpp:
2353         (WebCore::SVGInlineTextBox::offsetForPositionInFragment):
2354         (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
2355         (WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
2356         (WebCore::SVGInlineTextBox::constructTextRun):
2357         (WebCore::SVGInlineTextBox::paintText):
2358         * rendering/svg/SVGTextLayoutEngineSpacing.cpp:
2359         (WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning):
2360         * rendering/svg/SVGTextMetrics.cpp:
2361         (WebCore::constructTextRun):
2362         (WebCore::SVGTextMetrics::measureCharacterRange):
2363         * rendering/svg/SVGTextRunRenderingContext.cpp: Copied from svg/SVGFont.cpp.
2364         (WebCore::svgFontAndFontFaceElementForFontData):
2365         (WebCore::firstParentRendererForNonTextNode):
2366         (WebCore::referencingRenderObjectFromRun):
2367         (WebCore::activePaintingResourceFromRun):
2368         (WebCore::SVGTextRunWalker::walk):
2369         (WebCore::floatWidthMissingGlyphCallback):
2370         (WebCore::floatWidthOfSubStringUsingSVGFont):
2371         (WebCore::SVGTextRunRenderingContext::floatWidthUsingSVGFont):
2372         (WebCore::SVGTextRunRenderingContext::drawTextUsingSVGFont):
2373         (WebCore::SVGTextRunRenderingContext::selectionRectForTextUsingSVGFont):
2374         (WebCore::SVGTextRunRenderingContext::offsetForPositionForTextUsingSVGFont):
2375         * rendering/svg/SVGTextRunRenderingContext.h: Added.
2376         (WebCore::SVGTextRunRenderingContext::create):
2377         (WebCore::SVGTextRunRenderingContext::context):
2378         (WebCore::SVGTextRunRenderingContext::activePaintingResource):
2379         (WebCore::SVGTextRunRenderingContext::setActivePaintingResource):
2380         (WebCore::SVGTextRunRenderingContext::SVGTextRunRenderingContext):
2381         (WebCore::textRunNeedsRenderingContext):
2382         * svg/SVGAllInOne.cpp:
2383         * svg/SVGFont.cpp: Removed.
2384         * svg/SVGFontData.cpp:
2385         (WebCore::SVGFontData::initializeFontData):
2386         * svg/SVGFontData.h:
2387         (WebCore::SVGFontData::create):
2388         (WebCore::SVGFontData::isSVGFontData):
2389         * svg/SVGGlyphElement.cpp:
2390         (WebCore::SVGGlyphElement::SVGGlyphElement):
2391         (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
2392         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
2393         * svg/SVGHKernElement.cpp:
2394         (WebCore::SVGHKernElement::SVGHKernElement):
2395         (WebCore::SVGHKernElement::buildHorizontalKerningPair):
2396         * svg/SVGVKernElement.cpp:
2397         (WebCore::SVGVKernElement::SVGVKernElement):
2398         (WebCore::SVGVKernElement::buildVerticalKerningPair):
2399         * svg/SVGVKernElement.h:
2400
2401 2011-05-24  Ryuan Choi  <ryuan.choi@samsung.com>
2402
2403         Reviewed by Andreas Kling.
2404
2405         [GTK] Implement GraphicsContextCairo::imageInterpolationQuality().
2406         https://bugs.webkit.org/show_bug.cgi?id=60827
2407
2408         Implement getter/setter of imageInterpolationQuality and logic to change
2409         interpolation algorithm when drawing image.
2410         Mac and Qt already implemented it.
2411
2412         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2413         (WebCore::GraphicsContext::setImageInterpolationQuality):
2414         (WebCore::GraphicsContext::imageInterpolationQuality):
2415         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
2416         * platform/graphics/cairo/PlatformContextCairo.cpp:
2417         (WebCore::PlatformContextCairo::drawSurfaceToContext):
2418         * platform/graphics/cairo/PlatformContextCairo.h:
2419         (WebCore::PlatformContextCairo::setImageInterpolationQuality): Added.
2420         (WebCore::PlatformContextCairo::imageInterpolationQuality): Added.
2421
2422 2011-05-24  Leandro Gracia Gil  <leandrogracia@chromium.org>
2423
2424         Reviewed by Tony Gentilcore.
2425
2426         Media Stream API: adding Stream and GeneratedStream classes.
2427         https://bugs.webkit.org/show_bug.cgi?id=56666
2428
2429         Add the code for the Stream and GeneratedStream classes and integrate it
2430         with the existing stream generation requests.
2431
2432         Tests for the Media Stream API will be provided by the bug 56587.
2433
2434         * CMakeLists.txt:
2435         * CodeGenerators.pri:
2436         * DerivedSources.cpp:
2437         * DerivedSources.make:
2438         * GNUmakefile.list.am:
2439         * WebCore.gypi:
2440         * WebCore.pro:
2441         * WebCore.vcproj/WebCore.vcproj:
2442         * WebCore.xcodeproj/project.pbxproj:
2443         * bindings/js/JSEventTarget.cpp:
2444         (WebCore::toJS):
2445         * bindings/v8/V8DOMWrapper.cpp:
2446         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
2447         * dom/DOMAllInOne.cpp:
2448         * dom/EventTarget.cpp:
2449         (WebCore::EventTarget::toStream):
2450         (WebCore::EventTarget::toGeneratedStream):
2451         * dom/EventTarget.h:
2452         * dom/GeneratedStream.cpp: Added.
2453         (WebCore::GeneratedStream::DispatchUpdateTask::create):
2454         (WebCore::GeneratedStream::DispatchUpdateTask::performTask):
2455         (WebCore::GeneratedStream::DispatchUpdateTask::DispatchUpdateTask):
2456         (WebCore::GeneratedStream::create):
2457         (WebCore::GeneratedStream::GeneratedStream):
2458         (WebCore::GeneratedStream::~GeneratedStream):
2459         (WebCore::GeneratedStream::toGeneratedStream):
2460         (WebCore::GeneratedStream::detachEmbedder):
2461         (WebCore::GeneratedStream::stop):
2462         (WebCore::GeneratedStream::onStop):
2463         * dom/GeneratedStream.h: Added.
2464         * dom/GeneratedStream.idl: Added.
2465         * dom/Stream.cpp: Added.
2466         (WebCore::Stream::create):
2467         (WebCore::Stream::Stream):
2468         (WebCore::Stream::~Stream):
2469         (WebCore::Stream::toStream):
2470         (WebCore::Stream::streamEnded):
2471         (WebCore::Stream::scriptExecutionContext):
2472         (WebCore::Stream::eventTargetData):
2473         (WebCore::Stream::ensureEventTargetData):
2474         * dom/Stream.h: Added.
2475         (WebCore::Stream::readyState):
2476         (WebCore::Stream::label):
2477         (WebCore::Stream::refEventTarget):
2478         (WebCore::Stream::derefEventTarget):
2479         * dom/Stream.idl: Added.
2480         * page/CallbackTask.h:
2481         (WebCore::CallbackTask1::Scheduler::~Scheduler):
2482         * page/MediaStreamClient.h:
2483         * page/MediaStreamController.cpp:
2484         (WebCore::MediaStreamController::stopGeneratedStream):
2485         (WebCore::MediaStreamController::streamFailed):
2486         * page/MediaStreamController.h:
2487         * page/MediaStreamFrameController.cpp:
2488         (WebCore::MediaStreamFrameController::Request::Request):
2489         (WebCore::MediaStreamFrameController::GenerateStreamRequest::create):
2490         (WebCore::MediaStreamFrameController::GenerateStreamRequest::abort):
2491         (WebCore::MediaStreamFrameController::GenerateStreamRequest::GenerateStreamRequest):
2492         (WebCore::MediaStreamFrameController::unregister):
2493         (WebCore::MediaStreamFrameController::getStreamFromLabel):
2494         (WebCore::MediaStreamFrameController::generateStream):
2495         (WebCore::MediaStreamFrameController::stopGeneratedStream):
2496         (WebCore::MediaStreamFrameController::streamGenerated):
2497         (WebCore::MediaStreamFrameController::streamGenerationFailed):
2498         (WebCore::MediaStreamFrameController::streamFailed):
2499         * page/MediaStreamFrameController.h:
2500         (WebCore::MediaStreamFrameController::StreamClient::StreamClient):
2501         (WebCore::MediaStreamFrameController::StreamClient::isGeneratedStream):
2502         * page/NavigatorUserMediaError.h:
2503         (WebCore::NavigatorUserMediaError::create):
2504         (WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
2505         * page/NavigatorUserMediaSuccessCallback.h:
2506         * page/NavigatorUserMediaSuccessCallback.idl:
2507
2508 2011-05-23  Antti Koivisto  <antti@apple.com>
2509
2510         Reviewed by Oliver Hunt.
2511     
2512         REGRESSION (r45620): Node list caches never deleted
2513         https://bugs.webkit.org/show_bug.cgi?id=61268
2514         <rdar://problem/9467379>
2515         
2516         NodeListsNodeData::isEmpty() tests if RefCounted objects have refcount of zero which is impossible.
2517         As a results NodeList caches are never deleted, causing bad performance in DOM mutating operations as
2518         they repeatedly invalidate caches.
2519
2520         * dom/Node.cpp:
2521         (WebCore::Node::childNodes):
2522             Construct m_childNodeListCaches lazily.
2523
2524         (WebCore::Node::unregisterDynamicNodeList):
2525         (WebCore::Node::notifyLocalNodeListsAttributeChanged):
2526         (WebCore::Node::notifyLocalNodeListsChildrenChanged):
2527         (WebCore::Node::removeNodeListCacheIfPossible): 
2528             Add a helper.
2529
2530         (WebCore::NodeListsNodeData::invalidateCaches):
2531             Invalidate m_childNodeListCaches by clearing it if there are no additional clients
2532
2533         (WebCore::NodeListsNodeData::isEmpty):
2534             Test emptiness of various NodeListCaches simply by testing hash emptiness instead of testing for non-zero ref count of items.
2535             m_childNodeListCaches is empty if it is null.
2536
2537         * dom/Node.h: 
2538         * dom/NodeRareData.h:
2539         (WebCore::NodeListsNodeData::NodeListsNodeData):
2540             Construct m_childNodeListCaches lazily.
2541
2542 2011-05-24  Mikhail Naganov  <mnaganov@chromium.org>
2543
2544         Reviewed by Yury Semikhatsky.
2545
2546         Web Inspector: Reorganize InspectorBackendDispatch code to eliminate duplication
2547         https://bugs.webkit.org/show_bug.cgi?id=61300
2548
2549         * inspector/CodeGeneratorInspector.pm:
2550
2551 2011-05-23  Yury Semikhatsky  <yurys@chromium.org>
2552
2553         Reviewed by Adam Barth.
2554
2555         Chromium DevTools: Tab crashes with "Aw, snap!" on entering "(new Image())." in console
2556         https://bugs.webkit.org/show_bug.cgi?id=61194
2557
2558         Test: inspector/console/console-eval-syntax-error.html
2559
2560         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2561         (WebCore::V8InjectedScriptHost::evaluateCallback): return immediately in case of syntax error
2562
2563 2011-04-13  Steve Block  <steveblock@google.com>
2564
2565         Reviewed by Eric Seidel.
2566
2567         Geolocation callbacks should make use of new callback generation mechanism
2568         https://bugs.webkit.org/show_bug.cgi?id=40065
2569
2570         No new tests, refactoring only.
2571
2572         * Android.derived.jscbindings.mk:
2573         * Android.derived.v8bindings.mk:
2574         * Android.jscbindings.mk:
2575         * Android.v8bindings.mk:
2576         * CMakeLists.txt:
2577         * CodeGenerators.pri:
2578         * DerivedSources.cpp:
2579         * DerivedSources.make:
2580         * GNUmakefile.list.am:
2581         * UseJSC.cmake:
2582         * WebCore.gypi:
2583         * WebCore.order:
2584         * WebCore.pro:
2585         * WebCore.vcproj/WebCore.vcproj:
2586         * WebCore.xcodeproj/project.pbxproj:
2587         * bindings/js/JSBindingsAllInOne.cpp:
2588         * bindings/js/JSCustomPositionCallback.cpp: Removed.
2589         * bindings/js/JSCustomPositionCallback.h: Removed.
2590         * bindings/js/JSCustomPositionErrorCallback.cpp: Removed.
2591         * bindings/js/JSCustomPositionErrorCallback.h: Removed.
2592         * bindings/js/JSGeolocationCustom.cpp:
2593         (WebCore::JSGeolocation::getCurrentPosition):
2594         (WebCore::JSGeolocation::watchPosition):
2595         * bindings/v8/custom/V8CustomPositionCallback.cpp: Removed.
2596         * bindings/v8/custom/V8CustomPositionCallback.h: Removed.
2597         * bindings/v8/custom/V8CustomPositionErrorCallback.cpp: Removed.
2598         * bindings/v8/custom/V8CustomPositionErrorCallback.h: Removed.
2599         * bindings/v8/custom/V8GeolocationCustom.cpp:
2600         (WebCore::V8Geolocation::getCurrentPositionCallback):
2601         (WebCore::V8Geolocation::watchPositionCallback):
2602         * page/PositionCallback.h:
2603         * page/PositionCallback.idl: Added.
2604         * page/PositionErrorCallback.h:
2605         * page/PositionErrorCallback.idl: Added.
2606
2607 2011-05-23  Pavel Podivilov  <podivilov@chromium.org>
2608
2609         Reviewed by Yury Semikhatsky.
2610
2611         Web Inspector: watched expressions buttons do not match inspector styles.
2612         https://bugs.webkit.org/show_bug.cgi?id=30554
2613
2614         * WebCore.gypi:
2615         * inspector/front-end/BreakpointsSidebarPane.js:
2616         (WebInspector.XHRBreakpointsSidebarPane):
2617         * inspector/front-end/Images/deleteIcon.png: Added.
2618         * inspector/front-end/Images/paneRefreshButtons.png: Added.
2619         * inspector/front-end/WatchExpressionsSidebarPane.js:
2620         (WebInspector.WatchExpressionsSidebarPane.prototype.reset):
2621         (WebInspector.WatchExpressionsSidebarPane.prototype._addButtonClicked):
2622         (WebInspector.WatchExpressionsSidebarPane.prototype._refreshButtonClicked):
2623         (WebInspector.WatchExpressionsSidebarPane.prototype.refreshExpressions):
2624         (WebInspector.WatchExpressionsSection):
2625         (WebInspector.WatchExpressionsSection.prototype.update.appendResult):
2626         (WebInspector.WatchExpressionsSection.prototype.update):
2627         (WebInspector.WatchExpressionsSection.prototype.saveExpressions):
2628         (WebInspector.WatchExpressionsSection.prototype._mouseMove):
2629         (WebInspector.WatchExpressionsSection.prototype._mouseOut):
2630         (WebInspector.WatchExpressionsSection.prototype._updateHoveredElement):
2631         (WebInspector.WatchExpressionsSection.CompareProperties):
2632         (WebInspector.WatchExpressionTreeElement.prototype.update):
2633         (WebInspector.WatchExpressionTreeElement.prototype.editingCancelled):
2634         * inspector/front-end/WebKit.qrc:
2635         * inspector/front-end/inspector.css:
2636         (.properties-tree.watch-expressions):
2637         (.properties-tree.watch-expressions li):
2638         (.section .properties .delete-button):
2639         (.section .properties li.hovered .delete-button):
2640         (.pane > .title > .pane-title-button):
2641         (.pane > .title > .pane-title-button:hover):
2642         (.pane > .title > .pane-title-button:active):
2643         (.pane > .title > .pane-title-button.add):
2644         (.pane > .title > .pane-title-button.refresh):
2645
2646 2011-05-24  Yuta Kitamura  <yutak@chromium.org>
2647
2648         Reviewed by Kent Tamura.
2649
2650         WebSocket: Add fail() to WebSocketChannel and its family
2651         https://bugs.webkit.org/show_bug.cgi?id=61277
2652
2653         This is the first part of refactoring effort described in bug 61115.
2654         Existing error reports will be modified to use fail() in a later patch.
2655
2656         No change in behavior, thus no new tests.
2657
2658         * websockets/ThreadableWebSocketChannel.h:
2659         * websockets/WebSocketChannel.cpp:
2660         (WebCore::WebSocketChannel::fail):
2661         * websockets/WebSocketChannel.h:
2662         * websockets/WorkerThreadableWebSocketChannel.cpp:
2663         (WebCore::WorkerThreadableWebSocketChannel::fail):
2664         (WebCore::WorkerThreadableWebSocketChannel::Peer::fail):
2665         (WebCore::WorkerThreadableWebSocketChannel::mainThreadFail):
2666         (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
2667         * websockets/WorkerThreadableWebSocketChannel.h:
2668
2669 2011-05-24  Andras Becsi  <abecsi@webkit.org>
2670
2671         Reviewed by Csaba Osztrogon√°c.
2672
2673         [Qt][V8] REGRESSION (r87063): Fix the build.
2674         https://bugs.webkit.org/show_bug.cgi?id=61290
2675
2676         No new tests needed.
2677
2678         * bindings/scripts/CodeGeneratorV8.pm: disable the unsupported call
2679         tracked in: https://bugs.webkit.org/show_bug.cgi?id=61291
2680
2681 2011-05-24  Naoki Takano  <takano.naoki@gmail.com>
2682
2683         Reviewed by Kent Tamura.
2684
2685         [Chromium]Add clipping for listBox in popup window to fix wrong location display when the autofill item is really long.
2686         https://bugs.webkit.org/show_bug.cgi?id=61252
2687         http://code.google.com/p/chromium/issues/detail?id=83539
2688
2689         Manual test: manual-tests/autofill-popup-location.html.
2690
2691         * manual-tests/autofill-popup-location.html: With long long text, test the shown location is correct.
2692         * platform/chromium/PopupMenuChromium.cpp:
2693         (WebCore::PopupListBox::setBaseWidth): Clip width with m_maxWindowWidth.
2694         (WebCore::PopupListBox::PopupListBox): Add m_maxWindowWidth initialization.
2695         (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Call setMaxWidthAndLayout() when the width is clipped with screen size.
2696         (WebCore::PopupListBox::setMaxWidthAndLayout): Set m_maxWindowWidth and call layout().
2697         (WebCore::PopupListBox::layout): Compare renewed windowWidth and m_maxWindowWidth, and clip the it.
2698
2699 2011-05-24  James Robinson  <jamesr@chromium.org>
2700
2701         Reviewed by Kenneth Russell.
2702
2703         [chromium] Properly handle huge initial dimensions for 2d canvas when accelerated 2d canvas is enabled
2704         https://bugs.webkit.org/show_bug.cgi?id=60077
2705
2706         Return NULL from DrawingBuffer::create() if the initial dimensions are larger than we can support in hardware so
2707         that we properly use the software canvas path and not enable the compositor for the canvas.
2708
2709         compositing/tiling/huge-layer-img.html triggers this case by trying to create a 20000 pixel high canvas.  The
2710         failure was previously masked by other bugs fixed by r85661.
2711
2712         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2713         (WebCore::DrawingBuffer::DrawingBuffer):
2714             Return NULL from DrawingBuffer::create() if resize() fails.
2715
2716 2011-05-24  Fumitoshi Ukai  <ukai@chromium.org>
2717
2718         Reviewed by Adam Barth.
2719
2720         close before open WebSocket doesn't fire close event.
2721         https://bugs.webkit.org/show_bug.cgi?id=57301
2722
2723         In platformClose(), m_readStream may be 0 until proxy is resolved.
2724         It should callback didClose() in such case.
2725         
2726         Test: http/tests/websocket/tests/close-before-open.html
2727
2728         * platform/network/cf/SocketStreamHandleCFNet.cpp:
2729         (WebCore::SocketStreamHandle::platformClose):
2730
2731 2011-05-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2732
2733         Unreviewed, rolling out r87118.
2734         http://trac.webkit.org/changeset/87118
2735         https://bugs.webkit.org/show_bug.cgi?id=61347
2736
2737         patch breaks layout tests
2738         (https://bugs.webkit.org/show_bug.cgi?id=61342), and chromium
2739         tests (browser_test MacTestCmdUp and ui_test Scrollbar)
2740         (Requested by ukai_ on #webkit).
2741
2742         * WebCore.gyp/WebCore.gyp:
2743         * WebCore.gypi:
2744         * platform/ScrollAnimator.cpp:
2745         * platform/chromium/ScrollAnimatorChromiumMac.h: Removed.
2746         * platform/chromium/ScrollAnimatorChromiumMac.mm: Removed.
2747         * platform/graphics/IntPoint.h:
2748
2749 2011-05-23  Julien Chaffraix  <jchaffraix@codeaurora.org>
2750
2751         Reviewed by Adam Barth.
2752
2753         Remove Node::deprecatedParserAddChild
2754         https://bugs.webkit.org/show_bug.cgi?id=60818
2755
2756         No new tests as this is just a removal.
2757
2758         * dom/ContainerNode.cpp:
2759         * dom/ContainerNode.h:
2760         * dom/Node.cpp:
2761         * dom/Node.h:
2762         Removed the method now that the last instance got removed as part of the <input>
2763         shadow DOM refactoring.
2764
2765 2011-05-23  Dirk Schulze  <krit@webkit.org>
2766
2767         Reviewed by Darin Adler.
2768
2769         SVGTextPositioning attributes are marked as NumberList instead of LengthList
2770         https://bugs.webkit.org/show_bug.cgi?id=61301
2771
2772         SVGTextPositioningElement attributes x, y, dx and dy were marked as AnimatedNumberList
2773         instead of AnimatedLengthList.
2774         See specification http://www.w3.org/TR/SVG/text.html#InterfaceSVGTextPositioningElement
2775
2776         This does not affect the behavior, since we do not respect SVG units in SMIL animation yet.
2777         No new tests added.
2778
2779         * svg/SVGTextPositioningElement.cpp:
2780         (WebCore::SVGTextPositioningElement::fillPassedAttributeToPropertyTypeMap):
2781
2782 2011-05-19  MORITA Hajime  <morrita@google.com>
2783
2784         Reviewed by Dimitri Glazkov.
2785
2786         [Refactoring] Pass NodeRenderingContext to Node::rendererIsNeeded()
2787         https://bugs.webkit.org/show_bug.cgi?id=61114
2788
2789         - Extracted NodeRenderingContext from NodeRendererFactory, giving separate files to it.
2790         - Changed signature rendererIsNeeded(RenderStyle*) 
2791           to rendererIsNeeded(const NodeRenderingContext&).
2792           The style object is retrieved from NodeRendererFactory::style()
2793           This will allow rendererIsNeeded() to access contextual
2794           information like attaching phase and rendering-parent.
2795         
2796         No new tests. No behaviour change.
2797         
2798         * CMakeLists.txt:
2799         * GNUmakefile.list.am:
2800         * WebCore.gypi:
2801         * WebCore.pro:
2802         * WebCore.vcproj/WebCore.vcproj:
2803         * WebCore.xcodeproj/project.pbxproj:
2804         * dom/CharacterData.cpp:
2805         (WebCore::CharacterData::updateRenderer): Pass unresolved NodeRenderingContext& to rendererIsNeeded()
2806         (WebCore::CharacterData::rendererIsNeeded):
2807         * dom/CharacterData.h:
2808         * dom/DOMAllInOne.cpp:
2809         * dom/EditingText.cpp:
2810         (WebCore::EditingText::rendererIsNeeded):
2811         * dom/EditingText.h:
2812         * dom/Node.cpp:
2813         (WebCore::Node::parentNodeForRenderingAndStyle):
2814         (WebCore::Node::rendererIsNeeded):
2815         * dom/Node.h:
2816         * dom/NodeRenderingContext.cpp: Added.
2817         (WebCore::NodeRenderingContext::NodeRenderingContext):
2818         (WebCore::NodeRenderingContext::~NodeRenderingContext):
2819         (WebCore::NodeRenderingContext::setStyle):
2820         (WebCore::NodeRenderingContext::releaseStyle):
2821         (WebCore::NodeRenderingContext::nextRenderer):
2822         (WebCore::NodeRenderingContext::parentRenderer):
2823         (WebCore::NodeRenderingContext::hostChildrenChanged):
2824         (WebCore::NodeRenderingContext::shouldCreateRenderer):
2825         (WebCore::NodeRendererFactory::NodeRendererFactory):
2826         (WebCore::NodeRendererFactory::createRendererAndStyle):
2827         (WebCore::wrapWithRenderFullScreen):
2828         (WebCore::NodeRendererFactory::createRendererIfNeeded):
2829         * dom/NodeRenderingContext.h: Added.
2830         (WebCore::NodeRenderingContext::node):
2831         (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle):
2832         (WebCore::NodeRenderingContext::style):
2833         (WebCore::NodeRendererFactory::context):
2834         * dom/ShadowContentElement.h:
2835         * dom/Text.cpp:
2836         * dom/Text.h:
2837         * html/HTMLAppletElement.cpp:
2838         * html/HTMLAppletElement.h:
2839         * html/HTMLElement.cpp:
2840         * html/HTMLElement.h:
2841         * html/HTMLEmbedElement.cpp:
2842         * html/HTMLEmbedElement.h:
2843         * html/HTMLFormElement.cpp:
2844         * html/HTMLFormElement.h:
2845         * html/HTMLFrameElement.cpp:
2846         * html/HTMLFrameElement.h:
2847         * html/HTMLFrameSetElement.cpp:
2848         * html/HTMLFrameSetElement.h:
2849         * html/HTMLIFrameElement.cpp:
2850         * html/HTMLIFrameElement.h:
2851         * html/HTMLInputElement.cpp:
2852         * html/HTMLInputElement.h:
2853         * html/HTMLMediaElement.cpp:
2854         * html/HTMLMediaElement.h:
2855         * html/HTMLNoScriptElement.h:
2856         * html/HTMLObjectElement.cpp:
2857         * html/HTMLObjectElement.h:
2858         * html/HTMLOptGroupElement.h:
2859         * html/HTMLOptionElement.h:
2860         * html/HTMLVideoElement.cpp:
2861         * html/HTMLVideoElement.h:
2862         * html/shadow/DetailsMarkerControl.cpp:
2863         * html/shadow/DetailsMarkerControl.h:
2864         * html/shadow/MeterShadowElement.cpp:
2865         * html/shadow/MeterShadowElement.h:
2866         * html/shadow/ProgressShadowElement.cpp:
2867         * html/shadow/ProgressShadowElement.h:
2868         * svg/SVGDescElement.h:
2869         * svg/SVGElement.h:
2870         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2871         * svg/SVGFilterPrimitiveStandardAttributes.h:
2872         * svg/SVGFontElement.h:
2873         * svg/SVGGElement.cpp:
2874         * svg/SVGGElement.h:
2875         * svg/SVGGlyphElement.h:
2876         * svg/SVGHKernElement.h:
2877         * svg/SVGMarkerElement.h:
2878         * svg/SVGMissingGlyphElement.h:
2879         * svg/SVGSVGElement.h:
2880         * svg/SVGStyledElement.cpp:
2881         * svg/SVGStyledElement.h:
2882         * svg/SVGSymbolElement.h:
2883         * svg/SVGTRefElement.cpp:
2884         * svg/SVGTRefElement.h:
2885         * svg/SVGTSpanElement.cpp:
2886         * svg/SVGTSpanElement.h:
2887         * svg/SVGTextPathElement.cpp:
2888         * svg/SVGTextPathElement.h:
2889         * svg/SVGTitleElement.h:
2890         * svg/SVGVKernElement.h:
2891         * svg/SVGViewElement.h:
2892
2893 2011-05-20  MORITA Hajime  <morrita@google.com>
2894
2895         Reviewed by Dimitri Glazkov.
2896         
2897         [Refactoring] attach() following detach() should be replaced with Node::reattach()
2898         https://bugs.webkit.org/show_bug.cgi?id=61011
2899
2900         - Renamed forceReattach() to reattach()
2901         - Introduced reattachIfAttached() as a variant.
2902         
2903         No new tests. No behavior change.
2904
2905         * dom/CharacterData.cpp:
2906         (WebCore::CharacterData::updateRenderer):
2907         * dom/Element.cpp:
2908         (WebCore::Element::recalcStyle):
2909         * dom/Node.h:
2910         (WebCore::Node::reattach):
2911         (WebCore::Node::reattachIfAttached):
2912         * dom/Text.cpp:
2913         (WebCore::Text::recalcStyle):
2914         * html/HTMLDetailsElement.cpp:
2915         (WebCore::HTMLDetailsElement::refreshMainSummary):
2916         (WebCore::HTMLDetailsElement::parseMappedAttribute):
2917         * html/HTMLInputElement.cpp:
2918         (WebCore::HTMLInputElement::parseMappedAttribute):
2919         * html/HTMLObjectElement.cpp:
2920         (WebCore::HTMLObjectElement::renderFallbackContent):
2921         * html/HTMLPlugInImageElement.cpp:
2922         (WebCore::HTMLPlugInImageElement::recalcStyle):
2923         * html/HTMLSelectElement.cpp:
2924         (WebCore::HTMLSelectElement::parseMappedAttribute):
2925
2926 2011-05-23  Mark Rowe  <mrowe@apple.com>
2927
2928         Build fix after r87117.
2929
2930         When moving #defines out in to separate files I find that code is more likely to compile
2931         when the new header file is actually #included.
2932
2933         * editing/SpellingCorrectionController.h:
2934
2935 2011-05-23  Mike Lawther  <mikelawther@chromium.org>
2936
2937         Reviewed by James Robinson.
2938
2939         implement image-rendering: optimize-contrast (with a vendor prefix) as defined in CSS3 image values
2940         https://bugs.webkit.org/show_bug.cgi?id=56627
2941
2942         Tests: css3/images/optimize-contrast-canvas.html
2943                css3/images/optimize-contrast-image.html
2944
2945         * WebCore.xcodeproj/project.pbxproj:
2946         * css/CSSComputedStyleDeclaration.cpp:
2947         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2948         * css/CSSParser.cpp:
2949         (WebCore::CSSParser::parseValue):
2950         * css/CSSPrimitiveValueMappings.h:
2951         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2952         (WebCore::CSSPrimitiveValue::operator EImageRendering):
2953         * css/CSSPropertyNames.in:
2954         * css/CSSStyleSelector.cpp:
2955         (WebCore::CSSStyleSelector::applyProperty):
2956         * css/CSSValueKeywords.in:
2957         * css/SVGCSSComputedStyleDeclaration.cpp:
2958         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
2959         * css/SVGCSSPropertyNames.in:
2960         * css/SVGCSSStyleSelector.cpp:
2961         (WebCore::CSSStyleSelector::applySVGProperty):
2962         * css/SVGCSSValueKeywords.in:
2963         * html/HTMLCanvasElement.cpp:
2964         (WebCore::HTMLCanvasElement::paint):
2965         * html/HTMLCanvasElement.h:
2966         * platform/graphics/ImageRenderingMode.h: Added.
2967         * rendering/RenderBoxModelObject.cpp:
2968         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
2969         * rendering/RenderHTMLCanvas.cpp:
2970         (WebCore::RenderHTMLCanvas::paintReplaced):
2971         * rendering/style/RenderStyle.cpp:
2972         (WebCore::RenderStyle::diff):
2973         * rendering/style/RenderStyle.h:
2974         (WebCore::InheritedFlags::imageRendering):
2975         (WebCore::InheritedFlags::setImageRendering):
2976         (WebCore::InheritedFlags::initialImageRendering):
2977         * rendering/style/RenderStyleConstants.h:
2978         * rendering/style/SVGRenderStyle.cpp:
2979         (WebCore::SVGRenderStyle::diff):
2980         * rendering/style/SVGRenderStyle.h:
2981         (WebCore::SVGRenderStyle::InheritedFlags::operator==):
2982         (WebCore::SVGRenderStyle::setBitDefaults):
2983         * rendering/style/SVGRenderStyleDefs.h:
2984         * rendering/svg/SVGRenderTreeAsText.cpp:
2985         (WebCore::writeStyle):
2986
2987 2011-05-23  Sailesh Agrawal  <sail@chromium.org>
2988
2989         Reviewed by James Robinson.
2990
2991         Chromium Mac: Use ScrollAnimatorMac.mm for overlay scrollbar support
2992         https://bugs.webkit.org/show_bug.cgi?id=59753
2993
2994         No new tests. Just forking ScrollAnimatorMac to ScrollAnimatorChromiumMac.
2995
2996         * WebCore.gyp/WebCore.gyp:
2997         * WebCore.gypi:
2998         * platform/ScrollAnimator.cpp:
2999         * platform/chromium/ScrollAnimatorChromiumMac.h: Added.
3000         (WebCore::ScrollAnimatorChromiumMac::setIsDrawingIntoLayer):
3001         (WebCore::ScrollAnimatorChromiumMac::isDrawingIntoLayer):
3002         (WebCore::ScrollAnimatorChromiumMac::haveScrolledSincePageLoad):
3003         * platform/chromium/ScrollAnimatorChromiumMac.mm: Added. Forked from ScrollAnimatorMac and replaced all instances of ScrollAnimatorMac with ScrollAnimatorChromiumMac and ScrollbarThemeMac with ScrollbarThemeChromiumMac. Removed the ENABLE(SMOOTH_SCROLLING) around the file.
3004         (abs):
3005         (-[ScrollAnimationHelperDelegate initWithScrollAnimator:WebCore::]):
3006         (-[ScrollAnimationHelperDelegate scrollAnimatorDestroyed]):
3007         (-[ScrollAnimationHelperDelegate bounds]):
3008         (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]):
3009         (-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]):
3010         (-[ScrollAnimationHelperDelegate convertSizeToBase:]):
3011         (-[ScrollAnimationHelperDelegate convertSizeFromBase:]):
3012         (-[ScrollAnimationHelperDelegate convertSizeToBacking:]):
3013         (-[ScrollAnimationHelperDelegate convertSizeFromBacking:]):
3014         (-[ScrollAnimationHelperDelegate superview]):
3015         (-[ScrollAnimationHelperDelegate documentView]):
3016         (-[ScrollAnimationHelperDelegate window]):
3017         (-[ScrollAnimationHelperDelegate _recursiveRecomputeToolTips]):
3018         (-[ScrollbarPainterControllerDelegate initWithScrollAnimator:WebCore::]):
3019         (-[ScrollbarPainterControllerDelegate scrollAnimatorDestroyed]):
3020         (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
3021         (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
3022         (-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]):
3023         (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
3024         (-[ScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
3025         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
3026         (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]):
3027         (-[ScrollbarPartAnimation setCurrentProgress:]):
3028         (-[ScrollbarPartAnimation scrollAnimatorDestroyed]):
3029         (-[ScrollbarPainterDelegate initWithScrollAnimator:WebCore::]):
3030         (-[ScrollbarPainterDelegate cancelAnimations]):
3031         (-[ScrollbarPainterDelegate convertRectToBacking:]):
3032         (-[ScrollbarPainterDelegate convertRectFromBacking:]):
3033         (-[ScrollbarPainterDelegate layer]):
3034         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
3035         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
3036         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
3037         (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]):
3038         (-[ScrollbarPainterDelegate scrollAnimatorDestroyed]):
3039         (WebCore::ScrollAnimator::create):
3040         (WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac):
3041         (WebCore::ScrollAnimatorChromiumMac::~ScrollAnimatorChromiumMac):
3042         (WebCore::ScrollAnimatorChromiumMac::scroll):
3043         (WebCore::ScrollAnimatorChromiumMac::scrollToOffsetWithoutAnimation):
3044         (WebCore::ScrollAnimatorChromiumMac::adjustScrollXPositionIfNecessary):
3045         (WebCore::ScrollAnimatorChromiumMac::adjustScrollYPositionIfNecessary):
3046         (WebCore::ScrollAnimatorChromiumMac::adjustScrollPositionIfNecessary):
3047         (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
3048         (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX):
3049         (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY):
3050         (WebCore::ScrollAnimatorChromiumMac::notityPositionChanged):
3051         (WebCore::ScrollAnimatorChromiumMac::contentAreaWillPaint):
3052         (WebCore::ScrollAnimatorChromiumMac::mouseEnteredContentArea):
3053         (WebCore::ScrollAnimatorChromiumMac::mouseExitedContentArea):
3054         (WebCore::ScrollAnimatorChromiumMac::mouseMovedInContentArea):
3055         (WebCore::ScrollAnimatorChromiumMac::willStartLiveResize):
3056         (WebCore::ScrollAnimatorChromiumMac::contentsResized):
3057         (WebCore::ScrollAnimatorChromiumMac::willEndLiveResize):
3058         (WebCore::ScrollAnimatorChromiumMac::contentAreaDidShow):
3059         (WebCore::ScrollAnimatorChromiumMac::contentAreaDidHide):
3060         (WebCore::ScrollAnimatorChromiumMac::didBeginScrollGesture):
3061         (WebCore::ScrollAnimatorChromiumMac::didEndScrollGesture):
3062         (WebCore::ScrollAnimatorChromiumMac::didAddVerticalScrollbar):
3063         (WebCore::ScrollAnimatorChromiumMac::willRemoveVerticalScrollbar):
3064         (WebCore::ScrollAnimatorChromiumMac::didAddHorizontalScrollbar):
3065         (WebCore::ScrollAnimatorChromiumMac::willRemoveHorizontalScrollbar):
3066         (WebCore::ScrollAnimatorChromiumMac::cancelAnimations):
3067         (WebCore::elasticDeltaForTimeDelta):
3068         (WebCore::reboundDeltaForElasticDelta):
3069         (WebCore::elasticDeltaForReboundDelta):
3070         (WebCore::scrollWheelMultiplier):
3071         (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent):
3072         (WebCore::ScrollAnimatorChromiumMac::handleGestureEvent):
3073         (WebCore::ScrollAnimatorChromiumMac::pinnedInDirection):
3074         (WebCore::ScrollAnimatorChromiumMac::allowsVerticalStretching):
3075         (WebCore::ScrollAnimatorChromiumMac::allowsHorizontalStretching):
3076         (WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent):
3077         (WebCore::ScrollAnimatorChromiumMac::beginScrollGesture):
3078         (WebCore::ScrollAnimatorChromiumMac::endScrollGesture):
3079         (WebCore::ScrollAnimatorChromiumMac::snapRubberBand):
3080         (WebCore::roundTowardZero):
3081         (WebCore::roundToDevicePixelTowardZero):
3082         (WebCore::ScrollAnimatorChromiumMac::snapRubberBandTimerFired):
3083         (WebCore::ScrollAnimatorChromiumMac::startScrollbarPaintTimer):
3084         (WebCore::ScrollAnimatorChromiumMac::scrollbarPaintTimerIsActive):
3085         (WebCore::ScrollAnimatorChromiumMac::stopScrollbarPaintTimer):
3086         (WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired):
3087         (WebCore::ScrollAnimatorChromiumMac::setVisibleScrollerThumbRect):
3088         * platform/graphics/IntPoint.h:
3089
3090 2011-05-22  MORITA Hajime  <morrita@google.com>
3091
3092         Reviewed by Ryosuke Niwa.
3093
3094         SUPPORT_AUTOCORRECTION_PANEL should be USE(AUTOCORRECTION_PANEL)
3095         https://bugs.webkit.org/show_bug.cgi?id=61181
3096
3097         - Removed SUPPORT_AUTOCORRECTION_PANEL and REMOVE_MARKERS_UPON_EDITING from SpellingCorrectionController.h
3098         - Define WTF_USE_UNIFIED_TEXT_CHECKING and WTF_USE_AUTOMATIC_TEXT_REPLACEMENT at TextChecking.h
3099
3100         No new tests. Just renaming a compilation conditional.
3101
3102         * editing/Editor.cpp:
3103         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
3104         * editing/SpellingCorrectionCommand.cpp:
3105         (WebCore::SpellingCorrectionCommand::doApply):
3106         * editing/SpellingCorrectionController.cpp:
3107         * editing/SpellingCorrectionController.h:
3108         (WebCore::SpellingCorrectionController::shouldRemoveMarkersUponEditing):
3109         * loader/EmptyClients.h:
3110         * page/EditorClient.h:
3111         * platform/text/TextChecking.h:
3112
3113 2011-05-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3114
3115         Unreviewed, rolling out r87007.
3116         http://trac.webkit.org/changeset/87007
3117         https://bugs.webkit.org/show_bug.cgi?id=61329
3118
3119         patch unnecessarily breaks HTML5 compatibility (Requested by
3120         estes on #webkit).
3121
3122         * html/HTMLObjectElement.cpp:
3123         (WebCore::HTMLObjectElement::hasValidClassId):
3124
3125 2011-05-23  Julien Chaffraix  <jchaffraix@codeaurora.org>
3126
3127         Reviewed by Darin Adler.
3128
3129         Crash from null pointer dereference below WebCore::StorageAreaImpl::setItem()
3130         https://bugs.webkit.org/show_bug.cgi?id=57140
3131
3132         Test: fast/storage/storage-detached-iframe.html
3133
3134         Access of localStorage on a detached iframe was causing a crash because a detached 
3135         iframe has a null m_page, and WebCore::privateBrowsingEnabled() wasn't testing for such.
3136
3137         * storage/StorageAreaImpl.cpp:
3138         (WebCore::privateBrowsingEnabled): check that child->page() is non-null before
3139         accessing it.
3140
3141 2011-05-23  Chris Fleizach  <cfleizach@apple.com>
3142
3143         Reviewed by David Kilzer.
3144
3145         VO doesn't work with HTML5 range (slider) input @step attribute
3146         https://bugs.webkit.org/show_bug.cgi?id=61298
3147
3148         Test: platform/mac/accessibility/range-alter-by-step.html
3149
3150         * accessibility/AccessibilityObject.h:
3151         (WebCore::AccessibilityObject::stepValueForRange):
3152         * accessibility/AccessibilityRenderObject.cpp:
3153         (WebCore::AccessibilityRenderObject::alterSliderValue):
3154         (WebCore::AccessibilityRenderObject::increment):
3155         (WebCore::AccessibilityRenderObject::decrement):
3156         (WebCore::AccessibilityRenderObject::stepValueForRange):
3157         (WebCore::AccessibilityRenderObject::changeValueByStep):
3158         * accessibility/AccessibilityRenderObject.h:
3159
3160 2011-05-23  Gavin Peters  <gavinp@chromium.org>
3161
3162         Reviewed by Adam Barth.
3163
3164         fix rel=prerender target types
3165         https://bugs.webkit.org/show_bug.cgi?id=61297
3166
3167         The original fix in https://bugs.webkit.org/show_bug.cgi?id=61079
3168         didn't properly map the target type, and didn't carry the target
3169         types through to chromium properly.  Fixed.
3170
3171         No new tests; it's very hard to catch these with a layout test, however
3172         all of the chromium Prerender browser tests will test this functionality
3173         when I land an upcoming chromium CL.
3174
3175         * loader/cache/CachedResourceRequest.cpp:
3176         (WebCore::cachedResourceTypeToTargetType):
3177
3178 2011-05-23  Matthew Delaney  <mdelaney@apple.com>
3179
3180         Reviewed by Simon Fraser.
3181
3182         Remove safeFloatToInt() in FloatRect.cpp and replace with working version of clampToInteger()
3183         https://bugs.webkit.org/show_bug.cgi?id=58216
3184
3185         No new tests. The SVG tests mask-excessive-malloc.svg and pattern-excessive-malloc.svg exercise this code path.
3186
3187         * platform/graphics/FloatRect.cpp:
3188         (WebCore::enclosingIntRect):
3189
3190 2011-05-20  Jeremy Noble  <jer.noble@apple.com>
3191
3192         Reviewed by Darin Adler.
3193
3194         Video looks squished when animating to full screen.
3195         https://bugs.webkit.org/show_bug.cgi?id=61220
3196
3197         No new tests, because DumpRenderTree does not currently "animate" the full-screen transition.
3198
3199         There are three issues animating video content to full screen which this patch is meant to
3200         address:
3201         1) The animation scales between the client sizes of the element before and after full-screen.
3202         Because these sizes have different aspect ratios, the video appears "squished" for part of
3203         the animation. Instead, we will animate between the content box sizes before and after full
3204         screen which, in the case of video now and object-fit content in the future, will have the
3205         same aspect ratio before and after full screen.
3206         2) Now that we are animating the full-screen video element's content box, the black letterbox
3207         bars appear above and below the video (depending on the video's aspect ratio) as soon as the
3208         animation begins. This is extremely jarring, so set the background color to clear. The
3209         full-screen renderer's background color will serve the same purpose (providing the letterbox
3210         background) once the animation completes.
3211         3) Now that the letterbox color is gone, the full screen controls can appear to float in thin
3212         air beneath the video (again, depending on aspect ratio) during the animation, so to avoid
3213         that effect and to make the animation consistent with the old webkitenterfullscreen()
3214         animation, we will hide the controls during the animation by adding a new CSS pseudo class
3215         -webkit-animating-full-screen-transition.
3216
3217         Added a new css pseudo-class: -webkit-animating-full-screen.  During the transition animation, this
3218         pseudo-class will be applied to the current full-screen element.  Styles have been added to 
3219         fullscreenQuickTime.css to hide the video element's built-in controller during the full-screen
3220         animation.
3221
3222         To accomplish this, the ivar tracking whether the full-screen animation is taking place has been moved
3223         from the RenderFullScreen renderer, to the current full-screen Document.  Because changing 
3224         isAnimatingFullScreen causes style changes, make sure to call recalcStyle on the full-screen element
3225         after changing.
3226
3227         This extra transition caused assertions in HTMLFormControlElement::updateFromElementCallback. A
3228         full-screen media control's renderer is disabled during the style recalculation when exiting full
3229         screen. This assertion was exposed by the extra recalcStyle() issued during the exit transition, and
3230         has been removed.
3231
3232         * WebCore.exp.in:
3233         * css/CSSSelector.cpp:
3234         (WebCore::CSSSelector::pseudoId): Add support for new pseudo class -webkit-animate-full-screen-transition.
3235         (WebCore::nameToPseudoTypeMap): Ditto.
3236         (WebCore::CSSSelector::extractPseudoType): Ditto.
3237         * css/CSSSelector.h:
3238         * css/CSSStyleSelector.cpp:
3239         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
3240         * css/fullscreen.css: 
3241         (video:-webkit-full-screen): Set full screen video background color to clear.
3242         * css/fullscreenQuickTime.css: 
3243         (video:-webkit-full-screen::-webkit-media-controls-panel): Set a default opacity transition.
3244         (video:-webkit-animating-full-screen::-webkit-media-controls-panel): Set the opacity to 0 and 
3245             disable the transition.
3246         * dom/Document.cpp:
3247         (WebCore::Document::Document):
3248         (WebCore::Document::webkitWillEnterFullScreenForElement): Call our new setAnimatingFullScreen function.
3249         (WebCore::Document::webkitDidEnterFullScreenForElement): Ditto.
3250         (WebCore::Document::webkitWillExitFullScreenForElement): Ditto.
3251         (WebCore::Document::webkitDidExitFullScreenForElement): Ditto.
3252         (WebCore::Document::isAnimatingFullScreen): Moved here from RenderFullScreen.
3253         (WebCore::Document::setAnimatingFullScreen): Ditto.
3254         * dom/Document.h:
3255         * html/HTMLFormControlElement.cpp: 
3256         (WebCore::updateFromElementCallback): Use the Document's isAnimatingFullScreen function.
3257         * page/FrameView.cpp:
3258         (WebCore::isDocumentRunningFullScreenAnimation): Ditto.
3259         * rendering/RenderFullScreen.cpp:
3260         * rendering/RenderFullScreen.h:
3261         * rendering/RenderLayerCompositor.cpp:
3262         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Ditto.
3263         (WebCore::RenderLayerCompositor::requiresCompositingForFullScreen): Ditto.
3264         * rendering/style/RenderStyleConstants.h:
3265
3266 2011-05-23  Emil A Eklund  <eae@chromium.org>
3267
3268         Reviewed by Eric Seidel.
3269
3270         Change RenderBlock hit testing to use IntPoint instead x,y pair
3271         https://bugs.webkit.org/show_bug.cgi?id=61146
3272
3273         Covered by existing tests.
3274
3275         * platform/graphics/IntPoint.h:
3276         (WebCore::toSize):
3277         Add toSize function for converting from point to size.
3278
3279         * rendering/RenderBlock.cpp:
3280         (WebCore::RenderBlock::isPointInOverflowControl):
3281         (WebCore::RenderBlock::nodeAtPoint):
3282         (WebCore::RenderBlock::hitTestFloats):
3283         (WebCore::RenderBlock::hitTestColumns):
3284         (WebCore::RenderBlock::hitTestContents):
3285         * rendering/RenderBlock.h:
3286         Change hit testing code in RenderBlock to use IntPoint.
3287
3288         * rendering/RenderListBox.cpp:
3289         (WebCore::RenderListBox::isPointInOverflowControl):
3290         * rendering/RenderListBox.h:
3291         Change overridden method to use IntPoint.
3292
3293 2011-05-23  Mike Reed  <reed@google.com>
3294
3295         Reviewed by James Robinson.
3296
3297         Skia: Need to implement GraphicsContext::clipConvexPolygon()
3298         https://bugs.webkit.org/show_bug.cgi?id=41311
3299
3300         No new tests. 
3301
3302         * platform/graphics/skia/GraphicsContextSkia.cpp:
3303         (WebCore::setPathFromConvexPoints):
3304         (WebCore::GraphicsContext::drawConvexPolygon):
3305         (WebCore::GraphicsContext::clipConvexPolygon):
3306
3307 2011-05-23  James Simonsen  <simonjam@chromium.org>
3308
3309         Reviewed by Adam Barth.
3310
3311         Convert raw pointer to RefPtr.
3312         https://bugs.webkit.org/show_bug.cgi?id=61196
3313
3314         * dom/XMLDocumentParserLibxml2.cpp:
3315         (WebCore::XMLDocumentParser::endElementNs):
3316         * dom/XMLDocumentParserQt.cpp:
3317         (WebCore::XMLDocumentParser::parseEndElement):
3318
3319 2011-05-23  Ryosuke Niwa  <rniwa@webkit.org>
3320
3321         Reviewed by Alexey Proskuryakov.
3322
3323         selectstart is fired for every mouse move
3324         https://bugs.webkit.org/show_bug.cgi?id=19489
3325
3326         Fixed the bug by dispatching selectstart event immediately before modifying selection in
3327         handleMousePressEventSingleClick and updateSelectionForMouseDrag.
3328
3329         Also replaced a boolean EventHandler::m_beganSelectingText by an enum-valued m_selectionInitiationState
3330         to retain 3 states:
3331         1. HaveNotStartedSelection - Selection has not been set by a mouse drag or a mouse click
3332         2. PlacedCaret - A caret was placed by a mouse click, double click, or triple click, and is about
3333         to replace selection if a mouse drag never occurs.
3334         3. ExtendedSelection - A range selection was set by a mouse click, a double click, a triple click,
3335         or a mouse drag; otherwise a caret selection was set by a mouse drag.
3336
3337         State 1 corresponds to m_beganSelectingText being false and state 3 corresponds to m_beganSelectingText
3338         being true. State 2 is used in updateSelectionForMouseDrag to avoid dispatching selectstart twice.
3339
3340         States 1 and 2 are set by updateSelectionForMouseDownDispatchingSelectStart and state 3 is set by
3341         updateSelectionForMouseDrag.
3342
3343         Test: fast/events/selectstart-by-double-triple-clicks.html
3344               fast/events/selectstart-by-drag.html
3345               fast/events/selectstart-by-single-click-with-shift.html
3346
3347         * page/EventHandler.cpp: Removed canMouseDragExtendSelect.
3348         (WebCore::EventHandler::EventHandler): Initializes m_selectionInitiationState.
3349         (WebCore::dispatchSelectStart): Returns true only if selectstart was successfully fired
3350         and default action was not prevented.
3351         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart): Updates m_selectionInitiationState
3352         and modifies the selection if dispatchSelectStart returns true.
3353         (WebCore::EventHandler::selectClosestWordFromMouseEvent): Calls updateSelectionForMouseDownDispatchingSelectStart.
3354         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Ditto.
3355         (WebCore::EventHandler::handleMousePressEventDoubleClick):
3356         (WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
3357         (WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
3358         (WebCore::canMouseDownStartSelect): No longer dispatches startselect; also renamed from
3359         EventHandler::canMouseDownStartSelect.
3360         (WebCore::EventHandler::handleMousePressEvent): No longer calls canMouseDragExtendSelect.
3361         (WebCore::EventHandler::handleMouseDraggedEvent):
3362         (WebCore::EventHandler::updateSelectionForMouseDrag): Exit early if m_selectionInitiationState is
3363         HaveNotStartedSelection and dispatchSelectStart returns false. Since setSelectionIfPossible dispatches
3364         selectstart event before assigning PlacedCaret or ExtendedSelection to m_selectionInitiationState,
3365         there is no need to dispatch event for those two cases.
3366         (WebCore::EventHandler::handleMouseReleaseEvent):
3367         * page/EventHandler.h: Removed canMouseDownStartSelect and canMouseDragExtendSelect from EventHandler
3368         and added setSelectionIfPossible.
3369
3370 2011-05-23  Adam Klein  <adamk@chromium.org>
3371
3372         Reviewed by Jian Li.
3373
3374         [fileapi] Add a File::createWithName method to avoid obfuscated filename leakage from FileEntry.file() method
3375         https://bugs.webkit.org/show_bug.cgi?id=61155
3376
3377         Covered by existing tests: fast/filesystem/file-from-file-entry.html
3378                                    fast/filesystem/workers/file-from-file-entry.html
3379                                    fast/filesystem/workers/file-from-file-entry-sync.html
3380
3381         * fileapi/DOMFileSystem.cpp:
3382         (WebCore::DOMFileSystem::createFile): Updated to call createWithName().
3383         * fileapi/DOMFileSystemSync.cpp:
3384         (WebCore::DOMFileSystemSync::createFile): Updated to call createWithName().
3385         * fileapi/File.cpp:
3386         (WebCore::createBlobDataForFile): Added an optional name argument to fix MIME type lookup.
3387         (WebCore::File::createWithRelativePath): Renamed from create() for consistency with new method.
3388         (WebCore::File::File):
3389         * fileapi/File.h:
3390         (WebCore::File::createWithName):
3391         * html/FileInputType.cpp:
3392         (WebCore::FileInputType::setFileList): Updated the single caller of File::createWithRelativePath().
3393
3394 2011-05-23  Adrienne Walker  <enne@google.com>
3395
3396         Reviewed by James Robinson.
3397
3398         [chromium] Fix division by zero in TilingData for boundary case texture sizes
3399         https://bugs.webkit.org/show_bug.cgi?id=61164
3400
3401         * platform/graphics/gpu/TilingData.cpp:
3402         (WebCore::TilingData::tileXIndexFromSrcCoord):
3403         (WebCore::TilingData::tileYIndexFromSrcCoord):
3404
3405 2011-05-23  Adam Barth  <abarth@webkit.org>
3406
3407         Reviewed by Eric Seidel.
3408
3409         Update ImageDecoder::create to match sniffing spec
3410         https://bugs.webkit.org/show_bug.cgi?id=47683
3411
3412         This change is difficult to test.  We're making this change to comply
3413         with standards even if the change is difficult to observe.  (This patch
3414         also causes us to match Firefox.)
3415
3416         Test: fast/images/busted-oval-does-not-render.html
3417
3418         * platform/image-decoders/ImageDecoder.cpp:
3419
3420 2011-05-23  Ruben  <chromium@hybridsource.org>
3421
3422         Reviewed by Tony Chang.
3423
3424         Chromium gyp patch to use new POSIX defines toolkit_uses_gtk and os_posix
3425         https://bugs.webkit.org/show_bug.cgi?id=61219
3426
3427         No new tests, just changing gyp defines.
3428
3429         * WebCore.gyp/WebCore.gyp:
3430
3431 2011-05-23  Abhishek Arya  <inferno@chromium.org>
3432
3433         Reviewed by Simon Fraser.
3434
3435         Terminate css color parsing on integers which are not followed
3436         by a terminator.
3437         https://bugs.webkit.org/show_bug.cgi?id=61293
3438
3439         Test: fast/css/parse-color-int-or-percent-crash.html
3440
3441         * css/CSSParser.cpp:
3442         (WebCore::parseColorIntOrPercentage):
3443
3444 2011-05-20  Ryosuke Niwa  <rniwa@webkit.org>
3445
3446         Reviewed by Enrica Casucci.
3447
3448         REGRESSION(r84311): WebKit copies too much styles when copying
3449         https://bugs.webkit.org/show_bug.cgi?id=60914
3450
3451         The bug was caused by WebKit's cloning node hierarchy up until the node that has background color.
3452         Fixed the bug by not cloning background color and adding the effective background color to the wrapping