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