2011-02-09 Hans Wennborg <hans@chromium.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-02-09  Hans Wennborg  <hans@chromium.org>
2
3         Reviewed by Jeremy Orlow.
4
5         IndexedDB: Cursors should skip deleted entries
6         https://bugs.webkit.org/show_bug.cgi?id=53690
7
8         Add test to check that the cursor skips deleted entries.
9
10         Test: storage/indexeddb/cursor-skip-deleted.html
11
12         * storage/IDBCursorBackendImpl.cpp:
13         (WebCore::IDBCursorBackendImpl::currentRowExists):
14         (WebCore::IDBCursorBackendImpl::continueFunctionInternal):
15         * storage/IDBCursorBackendImpl.h:
16
17 2011-02-08  Pavel Podivilov  <podivilov@chromium.org>
18
19         Reviewed by Yury Semikhatsky.
20
21         Web Inspector: script formatter should not create a worker for each script.
22         https://bugs.webkit.org/show_bug.cgi?id=54010
23
24         * inspector/front-end/ScriptFormatter.js:
25         (WebInspector.ScriptFormatter):
26         (WebInspector.ScriptFormatter.prototype._formatScript):
27         (WebInspector.ScriptFormatter.prototype._handleMessage):
28         (WebInspector.ScriptFormatter.prototype._handleError):
29
30 2011-02-08  Pavel Podivilov  <podivilov@chromium.org>
31
32         Reviewed by Pavel Feldman.
33
34         Web Inspector: sync uglifyjs parser files.
35         https://bugs.webkit.org/show_bug.cgi?id=54003
36
37         * inspector/front-end/UglifyJS/parse-js.js:
38         * inspector/front-end/UglifyJS/process.js:
39
40 2011-02-08  Ryosuke Niwa  <rniwa@webkit.org>
41
42         Reviewed by Darin Adler.
43
44         REGRESSION(71556,68059): queryCommandValue screws up background color at collapsed cursor
45         https://bugs.webkit.org/show_bug.cgi?id=53196
46
47         The bug was caused by Editor::selectionComputedStyle's modifying typing style without making a copy,
48         and its removing non-inheritable properties from the typing style. Fixed the bug by making a copy
49         before making the modification and not removing non-inheritable properties.
50
51         Also fixed a bug in selectionStartCSSPropertyValue that it doesn't handle xx-small to -webkit-xxx-large
52         by extracting a function from StyleChange::extractTextStyles and calling it in both extractTextStyles
53         and selectionStartCSSPropertyValue.
54
55         Test: editing/style/query-typing-style.html
56
57         * editing/ApplyStyleCommand.cpp:
58         (WebCore::legacyFontSizeFromCSSValue): Extracted from StyleChange::extractTextStyles.
59         (WebCore::StyleChange::extractTextStyles): Calls legacyFontSizeFromCSSValue; this fixes the bug that
60         CSS values from xx-small through -webkit-xxx-large are not accounted.
61         * editing/ApplyStyleCommand.h:
62         * editing/Editor.cpp:
63         (WebCore::Editor::selectionStartCSSPropertyValue): Calls legacyFontSizeFromCSSValue.
64         (WebCore::Editor::selectionComputedStyle): Makes a copy before modifying typing style.
65         No longer calls removeNonEditingProperties on the copied typing style so that background-color property
66         is included when merged into the style.
67
68 2011-02-08  Sam Weinig  <sam@webkit.org>
69
70         Reviewed by Maciej Stachowiak.
71
72         REGRESSION (r76831): Subframes are printed blank
73         <rdar://problem/8945867>
74
75         * page/FrameView.cpp:
76         (WebCore::FrameView::paintOverhangAreas):
77         Don't paint overhangs when printing.
78
79 2011-02-07  Jeremy Orlow  <jorlow@chromium.org>
80
81         Reviewed by Nate Chapin.
82
83         Events should propagate through IDBDatabase (for IDBRequest and IDBTransaction)
84         https://bugs.webkit.org/show_bug.cgi?id=53975
85
86         The third change in the series of overhauling IndexedDB's event model to match
87         the spec (at least the version in our heads and bugs).
88
89         Test: storage/indexeddb/transaction-event-propagation.html
90
91         * bindings/v8/V8DOMWrapper.cpp:
92         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
93         * dom/Event.cpp:
94         (WebCore::Event::isIDBAbortEvent):
95         (WebCore::Event::isIDBCompleteEvent):
96         * dom/Event.h:
97         * dom/EventTarget.cpp:
98         (WebCore::EventTarget::toIDBDatabase):
99         * dom/EventTarget.h:
100         * storage/IDBDatabase.cpp:
101         (WebCore::IDBDatabase::create):
102         (WebCore::IDBDatabase::IDBDatabase):
103         (WebCore::IDBDatabase::scriptExecutionContext):
104         (WebCore::IDBDatabase::eventTargetData):
105         (WebCore::IDBDatabase::ensureEventTargetData):
106         * storage/IDBDatabase.h:
107         (WebCore::IDBDatabase::toIDBDatabase):
108         (WebCore::IDBDatabase::refEventTarget):
109         (WebCore::IDBDatabase::derefEventTarget):
110         * storage/IDBDatabase.idl:
111         * storage/IDBRequest.cpp:
112         (WebCore::IDBRequest::onSuccess):
113         (WebCore::IDBRequest::dispatchEvent):
114         * storage/IDBTransaction.cpp:
115         (WebCore::IDBTransaction::backend):
116         (WebCore::IDBTransaction::db):
117         (WebCore::IDBTransaction::objectStore):
118         (WebCore::IDBTransaction::scriptExecutionContext):
119         (WebCore::IDBTransaction::dispatchEvent):
120         (WebCore::IDBTransaction::enqueueEvent):
121         * storage/IDBTransaction.h:
122         (WebCore::IDBTransaction::dispatchEvent):
123
124 2011-02-08  Kenneth Russell  <kbr@google.com>
125
126         Reviewed by James Robinson.
127
128         Add cache for GPU-accelerated path processing results
129         https://bugs.webkit.org/show_bug.cgi?id=45519
130
131         Adding a cache which holds the results of processing a path into
132         interior and exterior triangle meshes, according to the path
133         rendering algorithm from GPU Gems 3. No tests yet; will be tested
134         in conjunction with later code.
135
136         * platform/graphics/gpu/LoopBlinnPathCache.cpp: Added.
137         (WebCore::LoopBlinnPathCache::LoopBlinnPathCache):
138         (WebCore::LoopBlinnPathCache::~LoopBlinnPathCache):
139         (WebCore::LoopBlinnPathCache::addVertex):
140         (WebCore::LoopBlinnPathCache::clear):
141         (WebCore::LoopBlinnPathCache::addInteriorVertex):
142         (WebCore::LoopBlinnPathCache::numberOfInteriorEdgeVertices):
143         (WebCore::LoopBlinnPathCache::interiorEdgeVertices):
144         (WebCore::LoopBlinnPathCache::addInteriorEdgeVertex):
145         * platform/graphics/gpu/LoopBlinnPathCache.h: Added.
146         (WebCore::LoopBlinnPathCache::numberOfVertices):
147         (WebCore::LoopBlinnPathCache::vertices):
148         (WebCore::LoopBlinnPathCache::texcoords):
149         (WebCore::LoopBlinnPathCache::numberOfInteriorVertices):
150         (WebCore::LoopBlinnPathCache::interiorVertices):
151
152 2011-02-08  Zhenyao Mo  <zmo@google.com>
153
154         Reviewed by Kenneth Russell.
155
156         Rename GraphicsContext3D::WebGLEnumType
157         https://bugs.webkit.org/show_bug.cgi?id=45708
158
159         * html/canvas/WebGLProgram.cpp:
160         (WebCore::WebGLProgram::getAttachedShader):
161         * html/canvas/WebGLProgram.h:
162         * platform/graphics/GraphicsContext3D.h:
163
164 2011-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
165
166         Unreviewed, rolling out r77980.
167         http://trac.webkit.org/changeset/77980
168         https://bugs.webkit.org/show_bug.cgi?id=54043
169
170         "Crashes on Windows and Linux..." (Requested by leviw on
171         #webkit).
172
173         * WebCore.exp.in:
174         * accessibility/AXObjectCache.cpp:
175         (WebCore::AXObjectCache::visiblePositionForTextMarkerData):
176         * accessibility/AccessibilityObject.cpp:
177         (WebCore::startOfStyleRange):
178         (WebCore::endOfStyleRange):
179         * accessibility/AccessibilityRenderObject.cpp:
180         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
181         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
182         (objectAndOffsetUnignored):
183         * dom/Position.cpp:
184         (WebCore::Position::upstream):
185         (WebCore::Position::downstream):
186         * dom/Range.cpp:
187         (WebCore::Range::editingStartPosition):
188         * editing/Editor.cpp:
189         (WebCore::Editor::canDeleteRange):
190         * editing/ReplaceSelectionCommand.cpp:
191         (WebCore::ReplaceSelectionCommand::doApply):
192         * editing/SelectionController.cpp:
193         (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
194         (WebCore::SelectionController::setSelectedRange):
195         * editing/TextIterator.cpp:
196         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
197         * editing/TypingCommand.cpp:
198         (WebCore::TypingCommand::deleteKeyPressed):
199         * editing/VisiblePosition.cpp:
200         (WebCore::VisiblePosition::VisiblePosition):
201         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
202         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
203         (WebCore::VisiblePosition::canonicalPosition):
204         (WebCore::VisiblePosition::characterAfter):
205         (WebCore::VisiblePosition::localCaretRect):
206         (WebCore::makeRange):
207         (WebCore::startVisiblePosition):
208         (WebCore::endVisiblePosition):
209         (WebCore::setStart):
210         (WebCore::setEnd):
211         (WebCore::isFirstVisiblePositionInNode):
212         (WebCore::isLastVisiblePositionInNode):
213         * editing/VisiblePosition.h:
214         * editing/htmlediting.cpp:
215         (WebCore::firstInSpecialElement):
216         (WebCore::lastInSpecialElement):
217         (WebCore::visiblePositionBeforeNode):
218         (WebCore::visiblePositionAfterNode):
219         * editing/visible_units.cpp:
220         (WebCore::startPositionForLine):
221         (WebCore::endPositionForLine):
222         (WebCore::previousLinePosition):
223         (WebCore::nextLinePosition):
224         (WebCore::startOfParagraph):
225         (WebCore::endOfParagraph):
226         (WebCore::endOfBlock):
227         (WebCore::startOfDocument):
228         (WebCore::endOfDocument):
229         (WebCore::logicalStartPositionForLine):
230         (WebCore::logicalEndPositionForLine):
231         * page/DOMSelection.cpp:
232         (WebCore::DOMSelection::collapse):
233         (WebCore::DOMSelection::setBaseAndExtent):
234         (WebCore::DOMSelection::setPosition):
235         (WebCore::DOMSelection::extend):
236         * page/EventHandler.cpp:
237         (WebCore::EventHandler::handleMousePressEventSingleClick):
238         * rendering/RenderObject.cpp:
239         (WebCore::RenderObject::createVisiblePosition):
240         * rendering/RenderTextControl.cpp:
241         (WebCore::RenderTextControl::visiblePositionForIndex):
242         * svg/SVGTextContentElement.cpp:
243         (WebCore::SVGTextContentElement::selectSubString):
244
245 2011-02-08  Jia Pu  <jpu@apple.com>
246
247         Reviewed by Darin Adler.
248
249         VisibleSelection::setWithoutValidation() should allow caret selection.
250         https://bugs.webkit.org/show_bug.cgi?id=53943
251
252         Test: editing/undo/undo-paste-when-caret-is-not-in-range.html
253
254         * editing/VisibleSelection.cpp:
255         (WebCore::VisibleSelection::setWithoutValidation):
256
257 2011-02-08  Martin Robinson  <mrobinson@igalia.com>
258
259         Reviewed by Xan Lopez.
260
261         [GTK] Remove the last remnants of the Mozilla theme drawing code
262         https://bugs.webkit.org/show_bug.cgi?id=54035
263
264         Remove all Mozilla theme drawing code.
265
266         No new tests. This change only removes dead code.
267
268         * GNUmakefile.am: Remove Mozilla files from the source list.
269         * platform/gtk/RenderThemeGtk.h: Remove Mozilla-theme-drawing-related methods
270         and add m_colormap to hold the current colormap of the widgets.
271         * platform/gtk/RenderThemeGtk2.cpp: Remove Mozilla code.
272         (WebCore::RenderThemeGtk::platformInit): Ditto.
273         (WebCore::RenderThemeGtk::~RenderThemeGtk): Ditto.
274         (WebCore::RenderThemeGtk::gtkContainer): Ditto.
275         * platform/gtk/ScrollbarThemeGtk2.cpp: Ditto.
276         * platform/gtk/WidgetRenderingContext.cpp: Ditto.
277         (WebCore::WidgetRenderingContext::WidgetRenderingContext): Ditto.
278         * platform/gtk/WidgetRenderingContext.h: Ditto.
279         * platform/gtk/gtk2drawing.c: Removed.
280         * platform/gtk/gtkdrawing.h: Removed.
281
282 2011-02-08  Yael Aharon  <yael.aharon@nokia.com>
283
284         Reviewed by Antti Koivisto.
285
286         Crash when logging into gmail.com with frame flattening turned on.
287         https://bugs.webkit.org/show_bug.cgi?id=52449
288
289         Frame flattening algorithm requires that layout always starts from the main frame, since layout of
290         subframes impacts the layout of their parents. 
291         There are places in the code that call view->layout() not on the main frame.
292         Instead of changing all the callsites, I changed FrameView::layout()
293         to force layout from the main frame if frame flattening is enabled.
294         In addition, postLayoutTasks can trigger relayout, so make it use the timer even more.
295         Move the call to SelectionController::updateAppearance() to performPostLayoutTasks(), 
296         because calling the from layout() leads to a crash in pages that have a selection in an iframe.
297
298         Tests: fast/frames/flattening/iframe-flattening-crash.html
299                fast/frames/flattening/iframe-flattening-selection-crash.html
300
301         * page/FrameView.cpp:
302         (WebCore::FrameView::layout):
303         (WebCore::FrameView::performPostLayoutTasks):
304
305 2011-02-08  Andy Estes  <aestes@apple.com>
306
307         Reviewed by Darin Adler.
308
309         <rdar://problem/8913952> REGRESSION (r76301): 'plaintext-only' must be
310         a supported contentEditable mode.
311         https://bugs.webkit.org/show_bug.cgi?id=54041
312
313         * html/HTMLElement.cpp:
314         (WebCore::HTMLElement::setContentEditable): Setting the contentEditable
315         attribute to 'plaintext-only' should not throw an exception.
316
317 2011-02-08  Dan Bernstein  <mitz@apple.com>
318
319         Reviewed by Simon Fraser.
320
321         RenderRubyRun::m_beingDestroyed is redundant
322         https://bugs.webkit.org/show_bug.cgi?id=54042
323
324         * rendering/RenderRubyRun.cpp:
325         (WebCore::RenderRubyRun::RenderRubyRun): Removed intialization of m_beingDestroyed.
326         (WebCore::RenderRubyRun::removeChild): Use the base class beingDestroyed(). 
327         * rendering/RenderRubyRun.h:
328
329 2011-02-08  Levi Weintraub  <leviw@chromium.org>
330
331         Reviewed by Ryosuke Niwa.
332
333         Stop instantiating legacy editing Positions in VisiblePosition
334         https://bugs.webkit.org/show_bug.cgi?id=52919
335
336         Changing VisiblePosition completely away from legacy positions.
337
338         No new tests since this is functionaly equivalent.
339
340         * WebCore.exp.in: Removing the legacy VisiblePosition constructor and
341         adding the PositionIsOffsetInAnchor symbol. If we must create VisiblePositions
342         outside of WebCore, they should be parent anchored.
343         * accessibility/AXObjectCache.cpp:
344         (WebCore::AXObjectCache::visiblePositionForTextMarkerData):
345         * accessibility/AccessibilityObject.cpp:
346         (WebCore::startOfStyleRange):
347         (WebCore::endOfStyleRange):
348         * accessibility/AccessibilityRenderObject.cpp:
349         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
350         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
351         (objectAndOffsetUnignored):
352         * dom/Position.cpp:
353         (WebCore::Position::upstream): Fixed to correctly respect PositionIsAfterAnchor
354         (WebCore::Position::downstream): ditto
355         * dom/Range.cpp:
356         (WebCore::Range::editingStartPosition):
357         * editing/Editor.cpp:
358         (WebCore::Editor::canDeleteRange):
359         * editing/ReplaceSelectionCommand.cpp:
360         (WebCore::ReplaceSelectionCommand::doApply):
361         * editing/SelectionController.cpp:
362         (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
363         (WebCore::SelectionController::setSelectedRange):
364         * editing/TextIterator.cpp:
365         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
366         * editing/TypingCommand.cpp:
367         (WebCore::TypingCommand::deleteKeyPressed):
368         * editing/VisiblePosition.cpp:
369         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
370         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
371         (WebCore::VisiblePosition::canonicalPosition):
372         (WebCore::VisiblePosition::characterAfter):
373         (WebCore::VisiblePosition::localCaretRect):
374         (WebCore::makeRange):
375         (WebCore::startVisiblePosition):
376         (WebCore::endVisiblePosition):
377         (WebCore::setStart):
378         (WebCore::setEnd):
379         (WebCore::isFirstVisiblePositionInNode):
380         (WebCore::isLastVisiblePositionInNode):
381         * editing/VisiblePosition.h:
382         (WebCore::VisiblePosition::VisiblePosition):
383         * editing/htmlediting.cpp:
384         (WebCore::firstInSpecialElement):
385         (WebCore::lastInSpecialElement):
386         (WebCore::visiblePositionBeforeNode):
387         (WebCore::visiblePositionAfterNode):
388         * editing/visible_units.cpp:
389         (WebCore::startPositionForLine):
390         (WebCore::endPositionForLine):
391         (WebCore::previousLinePosition):
392         (WebCore::nextLinePosition):
393         (WebCore::startOfParagraph):
394         (WebCore::endOfParagraph):
395         (WebCore::endOfBlock):
396         (WebCore::startOfDocument):
397         (WebCore::endOfDocument):
398         (WebCore::logicalStartPositionForLine):
399         (WebCore::logicalEndPositionForLine):
400         * page/DOMSelection.cpp:
401         (WebCore::DOMSelection::collapse):
402         (WebCore::DOMSelection::setBaseAndExtent):
403         (WebCore::DOMSelection::setPosition):
404         (WebCore::DOMSelection::extend):
405         * page/EventHandler.cpp:
406         (WebCore::EventHandler::handleMousePressEventSingleClick):
407         * rendering/RenderObject.cpp:
408         (WebCore::RenderObject::createVisiblePosition):
409         * rendering/RenderTextControl.cpp:
410         (WebCore::RenderTextControl::visiblePositionForIndex):
411         * svg/SVGTextContentElement.cpp:
412         (WebCore::SVGTextContentElement::selectSubString):
413
414 2011-02-08  Michael Saboff  <msaboff@apple.com>
415
416         JSC::Bindings m_rootObject->isValid() assert fails when running layout tests
417         https://bugs.webkit.org/show_bug.cgi?id=53716
418
419         Changed ASSERT to be an if for the case where the RuntimeObject was
420         GC'ed before RootObject::invalidate is called.  In that case there is 
421         no need to remove the RuntimeObject from the RootObject.  The isValid()
422         call will be false in this case, but the RuntimeObject has already
423         been removed from the RootObject.  Added similar defensive code
424         in RootObject::removeRuntimeObject().
425
426         * bridge/jsc/BridgeJSC.cpp:
427         (JSC::Bindings::Instance::willDestroyRuntimeObject):
428         * bridge/runtime_root.cpp:
429         (JSC::Bindings::RootObject::removeRuntimeObject):
430
431 2011-02-08  Beth Dakin  <bdakin@apple.com>
432
433         Reviewed by Darin Adler.
434
435         Fix for <rdar://problem/8953365> CrashTracer: 14 
436         crashes in WebProcess at com.apple.WebCore: 
437         -[ScrollKnobAnimation setCurrentProgress:] + 258
438
439         This crash seems to happen when the animation is running
440         and a window is closed. If the ScrollAnimator is destroyed,
441         delegate calls for the animation can still run, so we have 
442         to make sure we inform the delegates when the ScrollAnimator 
443         is gone, and then we have to null-check it before we do 
444         anything with it.
445
446         Remove scrollbarPainterDelegate() since it's not used anymore.
447         * platform/mac/ScrollAnimatorMac.h:
448         * platform/mac/ScrollAnimatorMac.mm:
449         
450         Add null-checks for _animator
451         (-[ScrollbarPartAnimation setCurrentProgress:]):
452         (-[ScrollbarPartAnimation scrollAnimatorDestroyed]):
453         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
454         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
455         (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]):
456         
457         New function to inform the delegates that the ScrollAnimator
458         is being destroyed.
459         (-[ScrollbarPainterDelegate scrollAnimatorDestroyed]):
460         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
461
462 2011-02-08  Adam Barth  <abarth@webkit.org>
463
464         Reviewed by Eric Seidel.
465
466         Remove orphan code from old parser
467         https://bugs.webkit.org/show_bug.cgi?id=53984
468
469         This code appears to be unused.
470
471         * html/HTMLParserErrorCodes.cpp:
472         * html/HTMLParserErrorCodes.h:
473         * html/HTMLParserQuirks.h:
474         * loader/EmptyClients.h:
475         * page/ChromeClient.h:
476
477 2011-02-08  Martin Robinson  <mrobinson@igalia.com>
478
479         Reviewed by Gustavo Noronha Silva.
480
481         [GTK] Move scrollbar rendering out of gtk2drawing.c
482         https://bugs.webkit.org/show_bug.cgi?id=52836
483
484         Replace gtk2drawing.c scrollbar rendering with our own version. This
485         is the last use of the Mozilla theme drawing code.
486
487         No new tests. This should not change the rendering of the default
488         theme.
489
490         * platform/gtk/GtkVersioning.h: Add some more backported allocation setters.
491         * platform/gtk/RenderThemeGtk.h: Add a getter for the scrollbar widgets.
492         * platform/gtk/RenderThemeGtk2.cpp:  Initialize and add getters for scrollbar widgets.
493         (WebCore::RenderThemeGtk::platformInit): Ditto.
494         (WebCore::RenderThemeGtk::gtkHScrollbar): Ditto.
495         (WebCore::RenderThemeGtk::gtkVScrollbar): Ditto.
496         * platform/gtk/ScrollbarThemeGtk.cpp: 
497         (WebCore::ScrollbarThemeGtk::paint): We only repaint the scrolled
498         window background if we are repainting a button or the thumb. In that
499         case also repaint the track rect.
500         * platform/gtk/ScrollbarThemeGtk2.cpp: Port to WidgetRenderingContext.
501         (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Ditto.
502         (WebCore::ScrollbarThemeGtk::updateThemeProperties): Ditto.
503         (WebCore::getWidgetForScrollbar): Ditto.
504         (WebCore::ScrollbarThemeGtk::paintTrackBackground): Ditto.
505         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
506         (WebCore::ScrollbarThemeGtk::paintThumb): Ditto.
507         (WebCore::ScrollbarThemeGtk::paintButton): Ditto.
508         * platform/gtk/WidgetRenderingContext.cpp: Ditto.
509         (WebCore::WidgetRenderingContext::gtkPaintBox): Added an option which
510         also adjusts a widget allocation according to the paint rect. This is
511         necessary to properly draw scrollbar buttons.
512         * platform/gtk/WidgetRenderingContext.h: Ditto.
513
514 2011-02-08  Simon Fraser  <simon.fraser@apple.com>
515
516         Reviewed by Dan Bernstein.
517
518         Inset shadow with large offset renders incorrectly
519         https://bugs.webkit.org/show_bug.cgi?id=53882
520         
521         Fix an issue with inset shadows, when the shadow offset
522         was larger than the box size. In this case we'd fail to
523         fill the box with the shadow color.
524
525         Test: fast/box-shadow/inset-shadow-large-offset.html
526
527         * rendering/RenderBoxModelObject.cpp:
528         (WebCore::areaCastingShadowInHole): Return a rect that covers the area
529         which contributes to the inset shadow.
530         
531         (WebCore::RenderBoxModelObject::paintBoxShadow): Use areaCastingShadowInHole()
532         to compute the outerRect.
533
534 2011-02-08  Zhenyao Mo  <zmo@google.com>
535
536         Reviewed by Kenneth Russell.
537
538         drawElements should check if a buffer is bound to ELEMENT_ARRAY_BUFFER
539         https://bugs.webkit.org/show_bug.cgi?id=54017
540
541         * html/canvas/WebGLRenderingContext.cpp:
542         (WebCore::WebGLRenderingContext::drawElements):
543
544 2011-01-28  Dimitri Glazkov  <dglazkov@chromium.org>
545
546         Reviewed by Darin Adler.
547
548         Change the rest of HTMLMediaElement shadow DOM parts to use shadowPseudoId.
549         https://bugs.webkit.org/show_bug.cgi?id=53190
550
551         This is the second part of refactoring the HTMLMediaElement to use new
552         shadow DOM. The changes are mainly mechanical, except for needing to
553         add a new method to RenderTheme, which indicates whether or not status
554         display is being used by it. Previously, we relied on existence of a cached
555         pseudo style.
556
557         Refactoring, covered by existing tests.
558
559         * css/CSSSelector.cpp:
560         (WebCore::CSSSelector::pseudoId): Removed now-unused enum values.
561         (WebCore::nameToPseudoTypeMap): Ditto.
562         (WebCore::CSSSelector::extractPseudoType): Ditto.
563         * css/CSSSelector.h: Ditto.
564         * html/shadow/MediaControls.cpp:
565         (WebCore::MediaControls::createPanel): Changed to use the newly-added MediaControlPanelElement.
566         (WebCore::MediaControls::createCurrentTimeDisplay): Changed to use the newly-added
567             MediaControlCurrentTimeDisplayElement.
568         (WebCore::MediaControls::createTimeRemainingDisplay): Changed to use the newly-added
569                 MediaControlTimeRemainingDisplayElement.
570         * rendering/MediaControlElements.cpp:
571         (WebCore::MediaControlShadowRootElement::updateStyle): Changed to use the
572             standard style resolution.
573         (WebCore::MediaControlShadowRootElement::shadowPseudoId): Added.
574         (WebCore::MediaControlElement::MediaControlElement): Removed the switch statement
575             that is no longer necessary.
576         (WebCore::MediaControlElement::styleForElement): Changed to use the standard
577             style resolution.
578         (WebCore::MediaControlPanelElement::MediaControlPanelElement): Added.
579         (WebCore::MediaControlPanelElement::create): Added.
580         (WebCore::MediaControlPanelElement::displayType): Added.
581         (WebCore::MediaControlPanelElement::shadowPseudoId): Added.
582         (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement):
583             Removed PseudoId constructor arg.
584         (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded):
585             Changed to use the newly-plumbed usesMediaControlStatusDisplay helper.
586         (WebCore::MediaControlTimelineContainerElement::displayType): Added.
587         (WebCore::MediaControlTimelineContainerElement::shadowPseudoId): Added.
588         (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement):
589             Removed PseudoId constructor arg.
590         (WebCore::MediaControlVolumeSliderContainerElement::displayType): Added.
591         (WebCore::MediaControlVolumeSliderContainerElement::shadowPseudoId): Added.
592         (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement):
593             Removed PseudoId constructor arg.
594         (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded): Changed to
595             use the newly-plumbed usesMediaControlStatusDisplay helper.
596         (WebCore::MediaControlStatusDisplayElement::displayType): Added.
597         (WebCore::MediaControlStatusDisplayElement::shadowPseudoId): Added.
598         (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
599             Removed PseudoId constructor arg.
600         (WebCore::MediaControlTimeRemainingDisplayElement::create): Added.
601         (WebCore::MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement): Added.
602         (WebCore::MediaControlTimeRemainingDisplayElement::displayType): Added.
603         (WebCore::MediaControlTimeRemainingDisplayElement::shadowPseudoId): Added.
604         (WebCore::MediaControlCurrentTimeDisplayElement::create): Added.
605         (WebCore::MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement): Added.
606         (WebCore::MediaControlCurrentTimeDisplayElement::displayType): Added.
607         (WebCore::MediaControlCurrentTimeDisplayElement::shadowPseudoId): Added.
608         * rendering/MediaControlElements.h: Added/changed defs accordingly.
609         * rendering/RenderTheme.h:
610         (WebCore::RenderTheme::usesMediaControlStatusDisplay): Added.
611         * rendering/RenderThemeMac.h: Added def.
612         * rendering/RenderThemeMac.mm:
613         (WebCore::RenderThemeMac::usesMediaControlStatusDisplay): Added.
614         * rendering/style/RenderStyleConstants.h: Removed now-unused enum values.
615
616 2011-02-08  Xiaomei Ji  <xji@chromium.org>
617
618         Reviewed by Dan Bernstein.
619
620         Fix pop-up button text not rendered correctly according to its direction
621         in <option>.
622         https://bugs.webkit.org/show_bug.cgi?id=53642
623  
624         In adjustInnerStyle(), if m_innerBlock's direction or unicode-bidi 
625         changes, set it needs layout.
626
627         Test: fast/text/international/pop-up-button-text-alignment-and-direction.html
628
629         * rendering/RenderMenuList.cpp:
630         (WebCore::RenderMenuList::adjustInnerStyle):
631
632 2011-02-08  Ilya Tikhonovsky  <loislo@chromium.org>
633
634         Unreviewed build fix for Qt-minimal.
635
636         * inspector/InspectorInstrumentation.h:
637         (WebCore::InspectorInstrumentation::hasFrontend):
638
639 2011-02-02  Ilya Tikhonovsky  <loislo@chromium.org>
640
641         Reviewed by Yury Semikhatsky.
642
643         Web Inspector: move InspectorController's methods from InspectorAgent to InspectorController.
644
645         https://bugs.webkit.org/show_bug.cgi?id=53169
646
647         All the Inspector API for WebCore has two parts.
648         The first one is InspectorInstrumentation for WebCore.
649         The second is InspectorController for WebKit.
650         InspectorAgent was produced by renaming original InspectorController.
651         This patch extracts WebKit related methods from InspectorAgent to InspectorController.
652
653         * WebCore.exp.in:
654         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
655         * html/HTMLDocument.cpp:
656         (WebCore::HTMLDocument::createParser):
657         * inspector/InspectorAgent.cpp:
658         (WebCore::InspectorAgent::InspectorAgent):
659         (WebCore::InspectorAgent::~InspectorAgent):
660         (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
661         (WebCore::InspectorAgent::inspect):
662         (WebCore::InspectorAgent::handleMousePress):
663         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
664         (WebCore::InspectorAgent::setFrontend):
665         (WebCore::InspectorAgent::disconnectFrontend):
666         (WebCore::InspectorAgent::resourceAgent):
667         (WebCore::InspectorAgent::createFrontendLifetimeAgents):
668         (WebCore::InspectorAgent::releaseFrontendLifetimeAgents):
669         (WebCore::InspectorAgent::populateScriptObjects):
670         (WebCore::InspectorAgent::pushDataCollectedOffline):
671         (WebCore::InspectorAgent::restoreProfiler):
672         (WebCore::InspectorAgent::startTimelineProfiler):
673         (WebCore::PostWorkerNotificationToFrontendTask::performTask):
674         (WebCore::InspectorAgent::didOpenDatabase):
675         (WebCore::InspectorAgent::didUseDOMStorage):
676         (WebCore::InspectorAgent::showAndEnableDebugger):
677         (WebCore::InspectorAgent::enableDebugger):
678         (WebCore::InspectorAgent::enabled):
679         * inspector/InspectorAgent.h:
680         (WebCore::InspectorAgent::frontend):
681         * inspector/InspectorController.cpp:
682         (WebCore::InspectorController::InspectorController):
683         (WebCore::InspectorController::~InspectorController):
684         (WebCore::InspectorController::setInspectorFrontendClient):
685         (WebCore::InspectorController::hasInspectorFrontendClient):
686         (WebCore::InspectorController::didClearWindowObjectInWorld):
687         (WebCore::InspectorController::startTimelineProfiler):
688         (WebCore::InspectorController::stopTimelineProfiler):
689         (WebCore::InspectorController::connectFrontend):
690         (WebCore::InspectorController::disconnectFrontend):
691         (WebCore::InspectorController::disconnectFrontendImpl):
692         (WebCore::InspectorController::show):
693         (WebCore::InspectorController::close):
694         (WebCore::InspectorController::restoreInspectorStateFromCookie):
695         (WebCore::InspectorController::evaluateForTestInFrontend):
696         (WebCore::InspectorController::drawNodeHighlight):
697         (WebCore::InspectorController::inspect):
698         (WebCore::InspectorController::enabled):
699         (WebCore::InspectorController::showPanel):
700         (WebCore::InspectorController::frontendLoaded):
701         (WebCore::InspectorController::timelineProfilerEnabled):
702         (WebCore::InspectorController::enableProfiler):
703         (WebCore::InspectorController::disableProfiler):
704         (WebCore::InspectorController::profilerEnabled):
705         (WebCore::InspectorController::debuggerEnabled):
706         (WebCore::InspectorController::showAndEnableDebugger):
707         (WebCore::InspectorController::disableDebugger):
708         (WebCore::InspectorController::startUserInitiatedProfiling):
709         (WebCore::InspectorController::stopUserInitiatedProfiling):
710         (WebCore::InspectorController::isRecordingUserInitiatedProfile):
711         (WebCore::InspectorController::setInspectorExtensionAPI):
712         (WebCore::InspectorController::resume):
713         (WebCore::InspectorController::hideHighlight):
714         (WebCore::InspectorController::dispatchMessageFromFrontend):
715         * inspector/InspectorController.h:
716         (WebCore::InspectorController::inspectorClient):
717         (WebCore::InspectorController::inspectedPage):
718         (WebCore::InspectorController::hasFrontend):
719         * inspector/InspectorFrontendClientLocal.cpp:
720         (WebCore::InspectorFrontendClientLocal::sendMessageToBackend):
721         * inspector/InspectorFrontendHost.cpp:
722         (WebCore::InspectorFrontendHost::setExtensionAPI):
723         * inspector/InspectorInstrumentation.cpp:
724         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
725         (WebCore::InspectorInstrumentation::profilerEnabledImpl):
726         * inspector/InspectorInstrumentation.h:
727         (WebCore::InspectorInstrumentation::hasFrontend):
728         * loader/FrameLoader.cpp:
729         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
730
731 2011-02-08  George Wright  <gwright@rim.com>
732
733         Reviewed by Adam Barth.
734
735         https://bugs.webkit.org/show_bug.cgi?id=53949
736
737         Ensure that we pack the colour byte order correctly for Skia using
738         Skia's SkPackARGB32 function.
739
740         * platform/image-decoders/ImageDecoder.h:
741         (WebCore::ImageFrame::setRGBA):
742
743 2011-02-08  George Wright  <gwright@rim.com>
744
745         Reviewed by Darin Adler.
746
747         https://bugs.webkit.org/show_bug.cgi?id=53951
748
749         Ensure we do not pass (-1, -1) sized rects to ImageBuffer but instead
750         pass the full image dimensions.
751
752         * platform/graphics/GraphicsContext.cpp:
753         (WebCore::GraphicsContext::drawImageBuffer):
754
755 2011-02-08  Patrick Gansterer  <paroga@webkit.org>
756
757         Reviewed by Adam Roben.
758
759         [WIN] Add missing includes and forward declarations for DownloadBundle
760         https://bugs.webkit.org/show_bug.cgi?id=53881
761
762         * platform/network/cf/DownloadBundle.h:
763         * platform/network/win/DownloadBundleWin.cpp:
764         (WebCore::DownloadBundle::appendResumeData):
765
766 2011-02-08  Patrick Gansterer  <paroga@webkit.org>
767
768         Reviewed by Adam Roben.
769
770         [WIN] Add missing include in WKCAImageQueue
771         https://bugs.webkit.org/show_bug.cgi?id=53890
772
773         * platform/graphics/win/WKCAImageQueue.cpp:
774
775 2011-02-08  Patrick Gansterer  <paroga@webkit.org>
776
777         Reviewed by Adam Roben.
778
779         [WIN] Add missing includes and forward declarations for CFNetwork
780         https://bugs.webkit.org/show_bug.cgi?id=53883
781
782         * platform/network/cf/DNSCFNet.cpp:
783         * platform/network/cf/LoaderRunLoopCF.cpp:
784         * platform/network/cf/LoaderRunLoopCF.h:
785         * platform/network/cf/ProxyServerCFNet.cpp:
786         * platform/network/cf/SocketStreamHandle.h:
787         * platform/network/cf/SocketStreamHandleCFNet.cpp:
788
789 2011-02-08  Patrick Gansterer  <paroga@webkit.org>
790
791         Unreviewed WinCE build fix for r77870.
792
793         * platform/DragImage.cpp: Enable createDragImageForLink for WinCE.
794
795 2011-02-08  Pavel Feldman  <pfeldman@chromium.org>
796
797         Reviewed by Yury Semikhatsky.
798
799         Web Inspector: open network resource url in new tab upon double click.
800         https://bugs.webkit.org/show_bug.cgi?id=53930
801
802         * inspector/front-end/NetworkPanel.js:
803         (WebInspector.NetworkDataGridNode.prototype.createCells):
804         (WebInspector.NetworkDataGridNode.prototype._openInNewTab):
805
806 2011-02-08  Yonathan Randolph  <yonathan@gmail.com>
807
808         Reviewed by Pavel Feldman.
809
810         Web Inspector: $x: any node should work in optional context parameter.
811         https://bugs.webkit.org/show_bug.cgi?id=50138
812
813         * inspector/InjectedScriptSource.js:
814
815 2011-02-08  Patrick Gansterer  <paroga@webkit.org>
816
817         Unreviewed WinCE build fix for r77870.
818
819         Remove the global namespace prefix from GlobalLock/GlobalUnlock.
820
821         * platform/win/ClipboardUtilitiesWin.cpp:
822
823 2011-02-08  Pavel Feldman  <pfeldman@chromium.org>
824
825         Not reviewed: re-apply r77924.
826
827         Test: inspector/console-api-on-call-frame.html
828
829         * inspector/InjectedScriptSource.js:
830         * inspector/front-end/ExtensionServer.js:
831         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
832
833 2011-02-08  Andreas Kling  <kling@webkit.org>
834
835         Reviewed by Tor Arne Vestbø.
836
837         REGRESSION(r77312): Unbreak TiledBackingStore.
838
839         Due to an off-by-one error, we were no longer rendering the
840         rightmost column and bottom row of tiles.
841
842         Covered by tst_QGraphicsWebView::widgetsRenderingThroughCache().
843
844         * platform/graphics/TiledBackingStore.cpp:
845         (WebCore::TiledBackingStore::invalidate):
846         (WebCore::TiledBackingStore::updateTileBuffers):
847         (WebCore::TiledBackingStore::paint):
848         (WebCore::TiledBackingStore::createTiles):
849
850 2011-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
851
852         Unreviewed, rolling out r77924.
853         http://trac.webkit.org/changeset/77924
854         https://bugs.webkit.org/show_bug.cgi?id=53997
855
856         Breaks inspector tests. (Requested by pfeldman on #webkit).
857
858         * inspector/InjectedScriptSource.js:
859         (.):
860         ():
861
862 2011-02-08  Andrey Kosyakov  <caseq@chromium.org>
863
864         Reviewed by Pavel Feldman.
865
866         Web Inspector: [refacotring] merge InspectorAgent::willSendRequest() into InspectorResourceAgent
867         https://bugs.webkit.org/show_bug.cgi?id=53789
868          - perform UserAgent override via InspectorInstrumentation
869          - move adding extra request headers to InspectorResourceAgent
870          - simplified things in InspectorState
871
872         * inspector/Inspector.idl:
873         * inspector/InspectorAgent.cpp:
874         (WebCore::InspectorAgent::disconnectFrontend):
875         (WebCore::InspectorAgent::applyUserAgentOverride):
876         * inspector/InspectorAgent.h:
877         * inspector/InspectorInstrumentation.cpp:
878         (WebCore::InspectorInstrumentation::applyUserAgentOverrideImpl):
879         (WebCore::InspectorInstrumentation::willSendRequestImpl):
880         * inspector/InspectorInstrumentation.h:
881         (WebCore::InspectorInstrumentation::applyUserAgentOverride):
882         * inspector/InspectorResourceAgent.cpp:
883         (WebCore::InspectorResourceAgent::setExtraHeaders):
884         (WebCore::InspectorResourceAgent::willSendRequest):
885         * inspector/InspectorResourceAgent.h:
886         * inspector/InspectorState.cpp:
887         (WebCore::InspectorState::InspectorState):
888         (WebCore::InspectorState::restoreFromInspectorCookie):
889         (WebCore::InspectorState::updateCookie):
890         (WebCore::InspectorState::setValue):
891         (WebCore::InspectorState::getBoolean):
892         (WebCore::InspectorState::getString):
893         (WebCore::InspectorState::getLong):
894         (WebCore::InspectorState::getObject):
895         * inspector/InspectorState.h:
896         (WebCore::InspectorState::setObject):
897         * loader/FrameLoader.cpp:
898         (WebCore::FrameLoader::userAgent):
899
900 2011-02-08  Pavel Feldman  <pfeldman@chromium.org>
901
902         Reviewed by Yury Semikhatsky.
903
904         Web Inspector: do not hide scope variables with command line api.
905         https://bugs.webkit.org/show_bug.cgi?id=53497
906
907         Test: inspector/console-api-on-call-frame.html
908
909         * inspector/InjectedScriptSource.js:
910
911 2011-02-08  Pavel Feldman  <pfeldman@chromium.org>
912
913         Reviewed by Yury Semikhatsky.
914
915         Web Inspector: ignore cache upon reload via Ctrl(Cmd)+Shift+R.
916         https://bugs.webkit.org/show_bug.cgi?id=53914
917
918         * inspector/Inspector.idl:
919         * inspector/InspectorAgent.cpp:
920         (WebCore::InspectorAgent::reloadPage):
921         * inspector/InspectorAgent.h:
922         * inspector/front-end/AuditsPanel.js:
923         (WebInspector.AuditsPanel.prototype._reloadResources):
924         * inspector/front-end/ExtensionServer.js:
925         (WebInspector.ExtensionServer.prototype._onReload):
926         * inspector/front-end/inspector.js:
927         (WebInspector.documentKeyDown):
928
929 2011-02-08  Antti Koivisto  <antti@apple.com>
930
931         Reviewed by Cameron Zwarich.
932
933         Skip over sibling selectors when collecting descendant selector hashes 
934         https://bugs.webkit.org/show_bug.cgi?id=53987
935         
936         Skip instead of bailing out. This will allow optimizing some sibling selector cases.
937
938         * css/CSSStyleSelector.cpp:
939         (WebCore::RuleData::RuleData):
940         (WebCore::RuleData::collectIdentifierHashes):
941         (WebCore::RuleData::collectDescendantSelectorIdentifierHashes):
942         * css/CSSStyleSelector.h:
943
944 2011-02-07  Cris Neckar  <cdn@chromium.org>
945
946         Reviewed by Jian Li.
947
948         Fix null deref in DOMURL
949         https://bugs.webkit.org/show_bug.cgi?id=53811
950
951         Test: fast/files/domurl-script-execution-context-crash.html
952
953         * html/DOMURL.cpp:
954         (WebCore::DOMURL::DOMURL):
955
956 2011-02-07  Mark Rowe  <mrowe@apple.com>
957
958         Fix the 32-bit build.
959
960         * platform/mac/ScrollAnimatorMac.mm:
961         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): Remove some extraneous characters.
962         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): Ditto.
963
964 2011-02-07  Xiyuan Xia  <xiyuan@chromium.org>
965
966         Reviewed by Tony Chang.
967
968         [Chromium] Select popup box does not align with select button when appearance is not "menulist".
969         https://bugs.webkit.org/show_bug.cgi?id=53942
970
971         Added manual test select_webkit_appearance_off_popup_alignment.html.
972
973         * manual-tests/select_webkit_appearance_off_popup_alignment.html: Added.
974         * platform/chromium/PopupMenuChromium.cpp:
975         (WebCore::PopupListBox::layout):
976
977 2011-02-07  Aparna Nandyal  <aparna.nand@wipro.com>
978
979         Reviewed by Andreas Kling.
980
981         [Qt] - Context menu needs "Copy" as well when the selected text is a link.
982         https://bugs.webkit.org/show_bug.cgi?id=40983
983
984         Added copy option for Qt platform if selection is a link. 
985         Added a test in tst_qwebpage.cpp. 
986
987         * page/ContextMenuController.cpp:
988         (WebCore::ContextMenuController::populate):
989
990 2011-02-07  Mike Reed  <reed@google.com>
991
992         Reviewed by Kenneth Russell.
993
994         Add compile-time flag ENABLE(SKIA_GPU) to use Skia's gpu backend
995         when drawing <canvas>. Disabled by default.
996
997         No new tests. existing canvas layouttests apply
998
999         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1000         (WebCore::DrawingBuffer::publishToPlatformLayer):
1001         * platform/graphics/skia/PlatformContextSkia.cpp:
1002         (WebCore::GetGlobalGrContext):
1003         (WebCore::PlatformContextSkia::isPrinting):
1004         (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
1005         (WebCore::PlatformContextSkia::syncSoftwareCanvas):
1006
1007 2011-02-07  Jay Civelli  <jcivelli@chromium.org>
1008
1009         Reviewed by Darin Fisher.
1010
1011         Removing unused code from PopupMenuChromium.
1012         https://bugs.webkit.org/show_bug.cgi?id=53866
1013
1014        * platform/chromium/PopupMenuChromium.cpp:
1015         (WebCore::PopupListBox::layout):
1016         (WebCore::PopupMenuChromium::show):
1017         * platform/chromium/PopupMenuChromium.h:
1018
1019 2011-02-07  Kenichi Ishibashi  <bashi@chromium.org>
1020
1021         Reviewed by Andreas Kling.
1022
1023         HTMLOutputElement::childrenChanged() should call its base class childrenChanged()
1024         https://bugs.webkit.org/show_bug.cgi?id=53791
1025
1026         Calls HTMLFormControlElement::childrenChanged() in HTMLOutputElement::childrenChanged().
1027
1028         Test: fast/dom/HTMLOutputElement/htmloutputelement-children-removed.html
1029
1030         * html/HTMLOutputElement.cpp:
1031         (WebCore::HTMLOutputElement::childrenChanged): Calls super class's
1032         childrenChanged().
1033
1034 2011-02-07  Benjamin Poulain  <ikipou@gmail.com>
1035
1036         Reviewed by Kenneth Rohde Christiansen.
1037
1038         [Qt] cookiesEnabled could create the cookieJar on the wrong thread.
1039         https://bugs.webkit.org/show_bug.cgi?id=52289
1040
1041         Use the QtNAMThreadSafeProxy to make sure the cookie jar is created
1042         in the same thread as the QNetworkAccessManager.
1043
1044         * platform/network/qt/QtNAMThreadSafeProxy.cpp:
1045         (WebCore::QtNAMThreadSafeProxy::QtNAMThreadSafeProxy):
1046         (WebCore::QtNAMThreadSafeProxy::hasCookieJar):
1047         * platform/network/qt/QtNAMThreadSafeProxy.h:
1048         * platform/qt/CookieJarQt.cpp:
1049         (WebCore::cookiesEnabled):
1050
1051 2011-02-07  Alexey Marinichev  <amarinichev@chromium.org>
1052
1053         Reviewed by Kenneth Russell.
1054
1055         Hook up WebGraphicsContext3D::setContextLostCallback.
1056         https://bugs.webkit.org/show_bug.cgi?id=53722
1057
1058         Test: fast/canvas/webgl/context-lost.html, comment out the line with
1059         extension.loseContext() and kill the GPU process "Lose context"
1060         message shows up.
1061
1062         * html/canvas/WebGLRenderingContext.cpp:
1063         (WebCore::WebGLRenderingContextLostCallback::WebGLRenderingContextLostCallback):
1064         (WebCore::WebGLRenderingContextLostCallback::onContextLost):
1065         (WebCore::WebGLRenderingContextLostCallback::~WebGLRenderingContextLostCallback):
1066         (WebCore::WebGLRenderingContext::initializeNewContext):
1067         (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
1068         * platform/graphics/GraphicsContext3D.h:
1069         (WebCore::GraphicsContext3D::ContextLostCallback::~ContextLostCallback):
1070         * platform/graphics/mac/GraphicsContext3DMac.mm:
1071         (WebCore::GraphicsContext3D::setContextLostCallback): stub
1072         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1073         (WebCore::GraphicsContext3D::setContextLostCallback): stub
1074
1075 2011-02-07  Patrick Gansterer  <paroga@webkit.org>
1076
1077         Reviewed by Eric Seidel.
1078
1079         Add missing PaintInfo include in RenderThemeWin.cpp
1080         https://bugs.webkit.org/show_bug.cgi?id=53885
1081
1082         * rendering/RenderThemeWin.cpp:
1083
1084 2011-02-07  Qi Zhang  <qi.2.zhang@nokia.com>
1085
1086         Reviewed by Andreas Kling.
1087
1088         [Qt] enum QWebPage::WebAction doesn't have value QWebPage::CopyImageUrl
1089         https://bugs.webkit.org/show_bug.cgi?id=52974
1090
1091         Add ContextMenuItemTagCopyImageUrlToClipboard into standard action but Qt platform specific.
1092
1093         * page/ContextMenuController.cpp:
1094         (WebCore::ContextMenuController::contextMenuItemSelected):
1095         (WebCore::ContextMenuController::populate):
1096         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
1097         * platform/ContextMenuItem.h:
1098         * platform/LocalizationStrategy.h:
1099         * platform/LocalizedStrings.cpp:
1100         (WebCore::contextMenuItemTagCopyImageUrlToClipboard):
1101         * platform/LocalizedStrings.h:
1102
1103 2011-02-07  Kenichi Ishibashi  <bashi@chromium.org>
1104
1105         Reviewed by Kent Tamura.
1106
1107         HTMLFormElement::formElementIndex() returns a bad index into a vector of form associated elements
1108         https://bugs.webkit.org/show_bug.cgi?id=53970
1109
1110         Adds HTMLObjectElement::virtualForm() to make HTMLObjectElement::form()
1111         return the right value.
1112
1113         Test: fast/dom/HTMLObjectElement/form/nested-form-element.html
1114
1115         * html/HTMLObjectElement.cpp:
1116         (WebCore::HTMLObjectElement::virtualForm): Added.
1117         * html/HTMLObjectElement.h: Added virtualForm().
1118
1119 2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
1120
1121         Unreviewed Leopard build fix.
1122
1123         * WebCore.xcodeproj/project.pbxproj: let XCode have developmentRegion.
1124         * platform/mac/DragImageMac.mm:
1125         (WebCore::webkit_CGCeiling): Cast the return value of ceil to CGFloat.
1126
1127 2011-02-07  Enrica Casucci  <enrica@apple.com>
1128
1129         Reviewed by Sam Weinig.
1130
1131         Fixing a build break on Mac caused by http://trac.webkit.org/changeset/77874
1132
1133         When moving code from WebKit to WebCore we needed to move some additional
1134         functions previously in NSStringExtras.
1135         
1136         * WebCore.xcodeproj/project.pbxproj:
1137         * platform/mac/DragImageMac.mm:
1138         (WebCore::fontFromNSFont):
1139         (WebCore::canUseFastRenderer):
1140         (WebCore::widthWithFont):
1141         (WebCore::webkit_CGCeiling):
1142         (WebCore::drawAtPoint):
1143         (WebCore::drawDoubledAtPoint):
1144         (WebCore::createDragImageForLink):
1145
1146 2011-02-07  Lucas Forschler  <lforschler@apple.com>
1147
1148         Reviewed by Geoff Garen.
1149
1150         Tr #2, Fix the Leopard 32bit debug build.
1151         
1152         No new tests required.
1153
1154         * WebCore.xcodeproj/project.pbxproj:
1155         * accessibility/AccessibilityAllInOne.cpp:
1156
1157 2011-02-07  Beth Dakin  <bdakin@apple.com>
1158
1159         Reviewed by Sam Weinig.
1160
1161         Fix for <rdar://problem/8946961> Fix repaint problems
1162         with WKScrollbarPainter scrollers while resizing the window
1163
1164         Remove setPainterForPainterController() and 
1165         removePainterFromPainterController() since they aren't
1166         used anymore.
1167         * platform/mac/ScrollAnimatorMac.h:
1168         
1169         Return early if they alpha hasn't changed.
1170         * platform/mac/ScrollAnimatorMac.mm:
1171         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
1172         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
1173         
1174         If we're in a live resize, restore alpha to 1.
1175         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
1176         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
1177
1178 2011-02-07  Beth Dakin  <bdakin@apple.com>
1179
1180         Reviewed by Eric Seidel.
1181
1182         Fix for https://bugs.webkit.org/show_bug.cgi?id=53950
1183         USE_WK_SCROLLBAR_PAINTER in ScrollbarThemeMac should be in
1184         Platform.h instead
1185
1186         Use hot new USE(WK_SCROLLBAR_PAINTER) from Platform.h rather
1187         than the silly, old in-file #define.
1188
1189         * platform/mac/ScrollbarThemeMac.mm:
1190         (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
1191         (WebCore::updateArrowPlacement):
1192         (WebCore::ScrollbarThemeMac::registerScrollbar):
1193         (WebCore::ScrollbarThemeMac::scrollbarThickness):
1194         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
1195         (WebCore::ScrollbarThemeMac::hasThumb):
1196         (WebCore::ScrollbarThemeMac::minimumThumbLength):
1197         (WebCore::ScrollbarThemeMac::paint):
1198
1199 2011-02-07  Enrica Casucci  <enrica@apple.com>
1200
1201         Reviewed Adam Roben and Darin Adler.
1202
1203         WebKit2: drag and drop support on Windows.
1204         https://bugs.webkit.org/show_bug.cgi?id=52775
1205         <rdar://problem/8514409>
1206
1207         * loader/EmptyClients.h: Removed createDragImageFromLink.
1208         * page/DragClient.h: Ditto.
1209         * page/DragController.cpp:
1210         (WebCore::DragController::startDrag): changed call to createDragImageFromLink.
1211         * platform/DragImage.h:
1212         * platform/mac/DragImageMac.mm:
1213         (WebCore::createDragImageForLink): Moved from DragClient.
1214         * platform/win/ClipboardUtilitiesWin.cpp: Added a series of functions
1215         to de-serialize the drag data from the map into an IDataObject.
1216         (WebCore::getWebLocData):
1217         (WebCore::texthtmlFormat):
1218         (WebCore::createGlobalData):
1219         (WebCore::getFullCFHTML):
1220         (WebCore::urlWFormat):
1221         (WebCore::urlFormat):
1222         (WebCore::filenameWFormat):
1223         (WebCore::filenameFormat):
1224         (WebCore::htmlFormat):
1225         (WebCore::smartPasteFormat):
1226         (WebCore::getURL):
1227         (WebCore::getPlainText):
1228         (WebCore::getTextHTML):
1229         (WebCore::ClipboardDataItem::ClipboardDataItem):
1230         (WebCore::getStringData):
1231         (WebCore::getUtf8Data):
1232         (WebCore::getCFData):
1233         (WebCore::setUCharData):
1234         (WebCore::setCharData):
1235         (WebCore::setCFData):
1236         (WebCore::getClipboardMap):
1237         (WebCore::getClipboardData):
1238         (WebCore::setClipboardData):
1239         * platform/win/ClipboardUtilitiesWin.h:
1240         * platform/win/DragImageWin.cpp: Moved createDragImageForLink from DragClient
1241         to a platform specific file in WebCore. It makes a lot more sense here, since
1242         the drag image is always created in WebCore for all the other content types
1243         except for links.
1244         (WebCore::dragLabelFont):
1245         (WebCore::createDragImageForLink):
1246         * platform/win/WCDataObject.cpp: Added new way to
1247         construct a WCDataObject from a DragDataMap.
1248         (WebCore::WCDataObject::createInstance):
1249         (WebCore::WCDataObject::clearData):
1250         * platform/win/WCDataObject.h:
1251
1252 2011-02-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1253
1254         Unreviewed, rolling out r77848.
1255         http://trac.webkit.org/changeset/77848
1256         https://bugs.webkit.org/show_bug.cgi?id=53963
1257
1258         caused 6 test failures (Requested by othermaciej on #webkit).
1259
1260         * rendering/RenderBlockLineLayout.cpp:
1261         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
1262
1263 2011-02-04  Kenneth Russell  <kbr@google.com>
1264
1265         Reviewed by James Robinson.
1266
1267         Add shaders for GPU accelerated path rendering
1268         https://bugs.webkit.org/show_bug.cgi?id=45520
1269
1270         Refactored SolidFillShader and TexShader to call new
1271         generateVertex() and generateFragment() methods on base Shader
1272         class, and added support for the Loop/Blinn shaders. Refactored
1273         Loop/Blinn shader classes to derive from Shader.
1274
1275         Tested these changes with several of the IE9 Testdrive demos with
1276         accelerated 2D canvas enabled, as well as a full layout test run
1277         with --platform chromium-gpu.
1278
1279         * platform/graphics/gpu/LoopBlinnShader.cpp: Added.
1280         (WebCore::LoopBlinnShader::LoopBlinnShader):
1281         (WebCore::LoopBlinnShader::use):
1282         * platform/graphics/gpu/LoopBlinnShader.h: Added.
1283         * platform/graphics/gpu/LoopBlinnSolidFillShader.cpp: Added.
1284         (WebCore::LoopBlinnSolidFillShader::create):
1285         (WebCore::LoopBlinnSolidFillShader::LoopBlinnSolidFillShader):
1286         (WebCore::LoopBlinnSolidFillShader::use):
1287         * platform/graphics/gpu/LoopBlinnSolidFillShader.h: Added.
1288         * platform/graphics/gpu/Shader.cpp:
1289         (WebCore::Shader::affineTo4x4):
1290         (WebCore::Shader::loadShader):
1291         (WebCore::Shader::loadProgram):
1292         (WebCore::Shader::generateVertex):
1293         (WebCore::Shader::generateFragment):
1294         * platform/graphics/gpu/Shader.h:
1295         * platform/graphics/gpu/SolidFillShader.cpp:
1296         (WebCore::SolidFillShader::create):
1297         * platform/graphics/gpu/TexShader.cpp:
1298         (WebCore::TexShader::TexShader):
1299         (WebCore::TexShader::create):
1300
1301 2011-02-07  Dan Bernstein  <mitz@apple.com>
1302
1303         Reviewed by Oliver Hunt.
1304
1305         <rdar://problem/8946023> REGRESSION (r76674): SVG + BiDi text broken (text-intro-05-t.svg)
1306         https://bugs.webkit.org/show_bug.cgi?id=53480
1307
1308         * WebCore.xcodeproj/project.pbxproj:
1309         * platform/graphics/mac/ComplexTextController.cpp:
1310         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): m_indexEnd should be an
1311         offset into m_characters, not into the run’s characters.
1312         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
1313         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Ditto.
1314
1315 2011-02-07  Sam Weinig  <sam@webkit.org>
1316
1317         Reviewed by Anders Carlsson.
1318
1319         Add bundle API to get the background color of a frame
1320         <rdar://problem/8962670>
1321         https://bugs.webkit.org/show_bug.cgi?id=53952
1322
1323         * WebCore.exp.in: Add export.
1324
1325 2011-02-07  Geoffrey Garen  <ggaren@apple.com>
1326
1327         Reviewed by Darin Adler.
1328
1329         Assertion failure in ~JSGlobalObject when loading apple.com HTML5
1330         transitions demo page
1331         https://bugs.webkit.org/show_bug.cgi?id=53853
1332
1333         This was a long-standing bookkeeping bug uncovered by some heap refactoring.
1334
1335         * html/HTMLCanvasElement.cpp:
1336         (WebCore::HTMLCanvasElement::createImageBuffer):
1337         * html/HTMLImageLoader.cpp:
1338         (WebCore::HTMLImageLoader::notifyFinished):
1339         * xml/XMLHttpRequest.cpp:
1340         (WebCore::XMLHttpRequest::dropProtection): Take the JSLock before
1341         reporting extra cost to the JavaScriptCore heap, since all use of
1342         JavaScriptCore is supposed to be guarded by JSLock.
1343
1344 2011-02-07  Jian Li  <jianli@chromium.org>
1345
1346         Reviewed by David Levin.
1347
1348         Intermittent crash in fast/files/read-blob-async.html on the GTK+ debug
1349         bots
1350         https://bugs.webkit.org/show_bug.cgi?id=53104
1351
1352         Covered by the existing tests.
1353
1354         * fileapi/FileStreamProxy.cpp:
1355         (WebCore::FileStreamProxy::startOnFileThread):
1356         * platform/network/BlobRegistryImpl.cpp:
1357         (WebCore::BlobRegistryImpl::createResourceHandle):
1358         * platform/network/BlobResourceHandle.cpp:
1359         (WebCore::BlobResourceHandle::BlobResourceHandle):
1360         (WebCore::BlobResourceHandle::cancel):
1361         (WebCore::delayedStartBlobResourceHandle):
1362         (WebCore::BlobResourceHandle::start): Keep BlobResourceHandle alive
1363         till the delay function is called.
1364         (WebCore::BlobResourceHandle::doStart):
1365         (WebCore::doNotifyFinish):
1366         (WebCore::BlobResourceHandle::notifyFinish): Notify the client via the
1367         standalone function to prevent the handle from being disposed immediately
1368         by the client which will make the calls in the stack that're still bound
1369         to the handle suffer.
1370         * platform/network/BlobResourceHandle.h:
1371         * platform/network/ResourceHandle.h: Change cancel() to virtual so that
1372         BlobResourceHandle::cancel will be called when we abort a FileReader.
1373
1374 2011-02-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1375
1376         Unreviewed, rolling out r77845.
1377         http://trac.webkit.org/changeset/77845
1378         https://bugs.webkit.org/show_bug.cgi?id=53946
1379
1380         build failure (Requested by lforschler_ on #webkit).
1381
1382         * WebCore.xcodeproj/project.pbxproj:
1383         * accessibility/AccessibilityAllInOne.cpp:
1384
1385 2011-02-07  Darin Adler  <darin@apple.com>
1386
1387         https://bugs.webkit.org/show_bug.cgi?id=53939
1388         fast/css/text-overflow-ellipsis.html failure after r77818/77819
1389
1390         * platform/text/TextCodecICU.cpp:
1391         (WebCore::TextCodecICU::registerExtendedEncodingNames):
1392         Add back the "utf8" synonym for "UTF-8".
1393
1394 2011-02-07  David Hyatt  <hyatt@apple.com>
1395
1396         Reviewed by Dan Bernstein.
1397
1398         Remove an unnecessary extra computeLogicalWidth() from line layout.
1399
1400         * rendering/RenderBlockLineLayout.cpp:
1401         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
1402
1403 2011-02-07  Lucas Forschler  <lforschler@apple.com>
1404
1405         Reviewed by Geoffrey Garen.
1406
1407         Fix Leopard Intel Debug Build.
1408         <rdar://problem/8953606> REGRESSION: Can't link WebCore on 32-bit Leopard (53681)
1409         This could potentially break windows, since I had to change #include <filename> to #include "filename"
1410         
1411         * WebCore.xcodeproj/project.pbxproj:
1412         * accessibility/AccessibilityAllInOne.cpp:
1413
1414 2011-02-07  Sam Weinig  <sam@webkit.org>
1415
1416         Fix build.
1417
1418         * platform/mac/ScrollAnimatorMac.mm:
1419         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
1420         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
1421         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
1422         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
1423
1424 2011-02-07  Sam Weinig  <sam@webkit.org>
1425
1426         Reviewed by Beth Dakin.
1427
1428         Add mechanism to inform the ScrollAnimator when Scrollbars are added 
1429         and removed.
1430
1431         * platform/ScrollAnimator.h:
1432         (WebCore::ScrollAnimator::didAddVerticalScrollbar):
1433         (WebCore::ScrollAnimator::willRemoveVerticalScrollbar):
1434         (WebCore::ScrollAnimator::didAddHorizontalScrollbar):
1435         (WebCore::ScrollAnimator::willRemoveHorizontalScrollbar):
1436         Make virtual to allow platform specific overrides.
1437
1438         * platform/ScrollView.cpp:
1439         (WebCore::ScrollView::setHasHorizontalScrollbar):
1440         (WebCore::ScrollView::setHasVerticalScrollbar):
1441         Call new ScrollableArea functions.
1442
1443         * platform/ScrollableArea.cpp:
1444         (WebCore::ScrollableArea::didAddVerticalScrollbar):
1445         (WebCore::ScrollableArea::willRemoveVerticalScrollbar):
1446         (WebCore::ScrollableArea::didAddHorizontalScrollbar):
1447         (WebCore::ScrollableArea::willRemoveHorizontalScrollbar):
1448         * platform/ScrollableArea.h:
1449         Pipe to ScrollAnimator.
1450
1451         * platform/mac/ScrollAnimatorMac.h:
1452         * platform/mac/ScrollAnimatorMac.mm:
1453         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
1454         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
1455         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
1456         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
1457         * platform/mac/ScrollbarThemeMac.h:
1458         * platform/mac/ScrollbarThemeMac.mm:
1459         (WebCore::ScrollbarThemeMac::registerScrollbar):
1460         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
1461         (WebCore::ScrollbarThemeMac::painterForScrollbar):
1462         Move painter delegate registration to the new didAdd/willRemove functions.
1463
1464 2011-02-07  Anders Carlsson  <andersca@apple.com>
1465
1466         Reviewed by Dan Bernstein.
1467
1468         Missing text match markers with accelerated content
1469         https://bugs.webkit.org/show_bug.cgi?id=53934
1470
1471         When doing the fake paint that recomputes the text match rects, we need to
1472         flatten compositing layers, otherwise the rects won't be updated until the next paint call.
1473
1474         (This worked by accident in WebKit1 because Safari calls -[NSWindow displayIfNeeded] on the containing
1475         window before asking for the text match rects).
1476
1477         * editing/Editor.cpp:
1478         (WebCore::Editor::countMatchesForText):
1479
1480 2011-02-07  Antti Koivisto  <antti@apple.com>
1481
1482         Reviewed by Andreas Kling.
1483
1484         REGRESSION(r77740): CSSStyleSelector accessing deleted memory for svg/dom/use-transform.svg
1485         https://bugs.webkit.org/show_bug.cgi?id=53900
1486         
1487         Ignore link elements in shadow trees.
1488
1489         * dom/Element.cpp:
1490         (WebCore::StyleSelectorParentPusher::StyleSelectorParentPusher):
1491         (WebCore::StyleSelectorParentPusher::~StyleSelectorParentPusher):
1492                 
1493             Some asserts to catch cases like this.
1494
1495         (WebCore::Element::attach):
1496         (WebCore::Element::recalcStyle):
1497         * html/HTMLLinkElement.cpp:
1498         (WebCore::HTMLLinkElement::HTMLLinkElement):
1499         (WebCore::HTMLLinkElement::process):
1500         (WebCore::HTMLLinkElement::insertedIntoDocument):
1501         (WebCore::HTMLLinkElement::removedFromDocument):
1502         * html/HTMLLinkElement.h:
1503
1504 2011-02-07  Darin Adler  <darin@apple.com>
1505
1506         Turn UTF-8 decoder off for now so we can look into failing tests
1507         without leaving the tree red.
1508
1509         * platform/text/TextCodecICU.cpp:
1510         (WebCore::TextCodecICU::registerBaseEncodingNames): Reverting
1511         earlier change so this can handle UTF-8.
1512         (WebCore::TextCodecICU::registerBaseCodecs): Ditto.
1513         (WebCore::TextCodecICU::registerExtendedEncodingNames): Ditto.
1514         (WebCore::TextCodecICU::registerExtendedCodecs): Ditto.
1515         * platform/text/TextCodecICU.h: Ditto.
1516         * platform/text/TextEncodingRegistry.cpp:
1517         (WebCore::buildBaseTextCodecMaps): Ditto.
1518         (WebCore::extendTextCodecMaps): Ditto.
1519         * platform/text/brew/TextCodecBrew.cpp:
1520         (WebCore::TextCodecBrew::registerBaseEncodingNames): Ditto.
1521         (WebCore::TextCodecBrew::registerBaseCodecs): Ditto.
1522         (WebCore::TextCodecBrew::registerExtendedEncodingNames): Ditto.
1523         (WebCore::TextCodecBrew::registerExtendedCodecs): Ditto.
1524         * platform/text/brew/TextCodecBrew.h: Ditto.
1525         * platform/text/gtk/TextCodecGtk.cpp:
1526         (WebCore::TextCodecGtk::registerBaseEncodingNames): Ditto.
1527         (WebCore::TextCodecGtk::registerBaseCodecs): Ditto.
1528         * platform/text/wince/TextCodecWinCE.cpp:
1529         (WebCore::TextCodecWinCE::registerBaseEncodingNames): Ditto.
1530         (WebCore::TextCodecWinCE::registerBaseCodecs): Ditto.
1531         (WebCore::TextCodecWinCE::registerExtendedEncodingNames): Ditto.
1532         (WebCore::TextCodecWinCE::registerExtendedCodecs): Ditto.
1533         * platform/text/wince/TextCodecWinCE.h: Ditto.
1534
1535 2011-02-07  Anders Carlsson  <andersca@apple.com>
1536
1537         Reviewed by Maciej Stachowiak.
1538
1539         Don't exclude overlay scrollers from the page overlay bounds
1540         https://bugs.webkit.org/show_bug.cgi?id=53924
1541
1542         Export ScrollbarTheme::nativeTheme.
1543
1544         * WebCore.exp.in:
1545
1546 2011-02-07  Zhenyao Mo  <zmo@google.com>
1547
1548         Reviewed by Kenneth Russell.
1549
1550         Crash in glDrawArrays with NaCl crystal model
1551         https://bugs.webkit.org/show_bug.cgi?id=52831
1552
1553         * html/canvas/WebGLRenderingContext.cpp: Allocate large enough buffer for atttrib0 if it's enabled and not used.
1554         (WebCore::WebGLRenderingContext::initVertexAttrib0):
1555         (WebCore::WebGLRenderingContext::simulateVertexAttrib0):
1556         * html/canvas/WebGLRenderingContext.h:
1557
1558 2011-02-07  Chris Fleizach  <cfleizach@apple.com>
1559
1560         Reviewed by Darin Adler.
1561
1562         WAI-ARIA @aria-sort not exposed on rowheader and columnheader roles.
1563         https://bugs.webkit.org/show_bug.cgi?id=53842
1564
1565         Test: platform/mac/accessibility/aria-sort.html
1566
1567         * accessibility/AccessibilityObject.cpp:
1568         (WebCore::AccessibilityObject::sortDirection):
1569         * accessibility/AccessibilityObject.h:
1570         * accessibility/mac/AccessibilityObjectWrapper.mm:
1571         (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
1572         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
1573         * html/HTMLAttributeNames.in:
1574
1575 2011-02-07  Darin Adler  <darin@apple.com>
1576
1577         Reviewed by Antti Koivisto.
1578
1579         Add built-in decoder for UTF-8 for improved performance
1580         https://bugs.webkit.org/show_bug.cgi?id=53898
1581
1582         Correct behavior is covered by existing tests.
1583
1584         * Android.mk: Added TextCodecUTF8.
1585         * CMakeLists.txt: Ditto.
1586         * GNUmakefile.am: Ditto.
1587         * WebCore.gypi: Ditto.
1588         * WebCore.pro: Ditto.
1589         * WebCore.vcproj/WebCore.vcproj: Ditto.
1590         * WebCore.xcodeproj/project.pbxproj: Ditto.
1591
1592         * platform/text/TextCodecICU.cpp: Removed registration of UTF-8
1593         since that's now handled by the built-in UTF-8 codec.
1594         (WebCore::TextCodecICU::registerEncodingNames): Renamed to remove
1595         the word "extended" since all codecs from ICU are now extended.
1596         (WebCore::TextCodecICU::registerCodecs): Ditto.
1597         * platform/text/TextCodecICU.h: Ditto.
1598
1599         * platform/text/TextCodecUTF16.cpp:
1600         (WebCore::TextCodecUTF16::decode): Added a FIXME about missing
1601         error handling.
1602
1603         * platform/text/TextCodecUTF8.cpp: Added.
1604         * platform/text/TextCodecUTF8.h: Added.
1605
1606         * platform/text/TextEncodingRegistry.cpp:
1607         (WebCore::buildBaseTextCodecMaps): Added TextCodecUTF8, and
1608         removed TextCodecICU, TextCodecBrew, and TextCodecWinCE.
1609         (WebCore::extendTextCodecMaps): Updated names for
1610         TextCodecICU and TextCodecWinCE.
1611
1612         * platform/text/brew/TextCodecBrew.cpp:
1613         (WebCore::TextCodecBrew::registerEncodingNames): Renamed to remove
1614         the word "extended" since all codecs from Brew are now extended.
1615         (WebCore::TextCodecBrew::registerCodecs): Ditto.
1616         * platform/text/brew/TextCodecBrew.h: Ditto.
1617
1618         * platform/text/gtk/TextCodecGtk.cpp:
1619         (WebCore::TextCodecGtk::registerBaseEncodingNames): Removed
1620         registration of UTF-8. It's questionable whether the other codecs
1621         here are really basic. If we think they qualify, then we should
1622         register them on other platforms, not just GTK.
1623         (WebCore::TextCodecGtk::registerBaseCodecs): Ditto.
1624
1625         * platform/text/wince/TextCodecWinCE.cpp:
1626         (WebCore::getCodePage): Removed special case for UTF-8 since we
1627         no longer use this codec for UTF-8.
1628         (WebCore::TextCodecWinCE::registerEncodingNames): Renamed to remove
1629         the word "extended" since all codecs from WinCE are now extended.
1630         (WebCore::TextCodecWinCE::registerCodecs): Ditto.
1631         * platform/text/wince/TextCodecWinCE.h: Ditto.
1632
1633 2011-02-07  Mario Sanchez Prada  <msanchez@igalia.com>
1634
1635         Reviewed by Xan Lopez.
1636
1637         [Gtk] atk_text_get_caret_offset fails for list items
1638         https://bugs.webkit.org/show_bug.cgi?id=53436
1639
1640         Consider list item markers when calculating the offset.
1641
1642         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1643         (webkit_accessible_text_get_caret_offset): Adjust the offset
1644         with the item marker's length for list items.
1645         (webkit_accessible_text_set_caret_offset): Replace usage of
1646         g_utf8_strlen() by calling to markerText.length().
1647
1648 2011-02-07  Yi Shen  <yi.4.shen@nokia.com>
1649
1650         Reviewed by Tor Arne Vestbø.
1651
1652         [Qt] Fix LayoutTests/media/restore-from-page-cache.html
1653         https://bugs.webkit.org/show_bug.cgi?id=53621
1654
1655         Changed the networkState to MediaPlayer::Loaded when 
1656         MediaPlayerPrivateQt has enough data.
1657
1658         Test: media/restore-from-page-cache.html
1659
1660         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
1661         (WebCore::MediaPlayerPrivateQt::updateStates):
1662
1663 2011-01-31  Pavel Podivilov  <podivilov@chromium.org>
1664
1665         Reviewed by Yury Semikhatsky.
1666
1667         Web Inspector: implement beautification of scripts inlined in html documents.
1668         https://bugs.webkit.org/show_bug.cgi?id=52706
1669
1670         To beautify scripts inlined in html, we need to cut individual scripts, beautify them using UglifyJS library, and
1671         finally paste them back to html.
1672
1673         * WebCore.gypi:
1674         * WebCore.vcproj/WebCore.vcproj:
1675         * inspector/front-end/ScriptFormatter.js:
1676         (WebInspector.ScriptFormatter): Implement formatting of scripts inlined in html.
1677         (WebInspector.ScriptFormatter.prototype.formatContent.didFormatChunks):
1678         (WebInspector.ScriptFormatter.prototype.formatContent):
1679         (WebInspector.ScriptFormatter.prototype._splitContentIntoChunks):
1680         (WebInspector.ScriptFormatter.prototype._formatChunks.didFormat):
1681         (WebInspector.ScriptFormatter.prototype._formatChunks):
1682         (WebInspector.ScriptFormatter.prototype._buildContentFromChunks):
1683         (WebInspector.ScriptFormatter.prototype._formatScript.messageHandler):
1684         (WebInspector.ScriptFormatter.prototype._formatScript):
1685         * inspector/front-end/ScriptFormatterWorker.js:
1686         (onmessage):
1687         (buildMapping):
1688         * inspector/front-end/SourceFrame.js:
1689         (WebInspector.SourceFrameContent): Use SourceFrameContent and FormattedSourceFrameContent to perform operations with line numbers.
1690         * inspector/front-end/SourceFrameContent.js: Added.
1691         (WebInspector.SourceFrameContent): Helper class, holds resource text and scripts layout
1692         (WebInspector.SourceFrameContent.prototype.get scriptRanges):
1693         (WebInspector.SourceFrameContent.prototype.locationToPosition):
1694         (WebInspector.SourceFrameContent.prototype.positionToLocation):
1695         (WebInspector.SourceFrameContent.prototype.scriptLocationForLineNumber):
1696         (WebInspector.SourceFrameContent.prototype.scriptLocationForRange):
1697         (WebInspector.SourceFrameContent.prototype.lineNumberToRange):
1698         (WebInspector.SourceFrameContent.prototype._intersectingScriptRange):
1699         (WebInspector):
1700         (WebInspector.FormattedSourceFrameContent): Helper class, holds original and formatted versions of resource and mapping between them.
1701         (WebInspector.FormattedSourceFrameContent.prototype.get text):
1702         (WebInspector.FormattedSourceFrameContent.prototype.originalLocationToFormattedLocation):
1703         (WebInspector.FormattedSourceFrameContent.prototype.scriptLocationForFormattedLineNumber):
1704         (WebInspector.FormattedSourceFrameContent.prototype._convertPosition):
1705         * inspector/front-end/WebKit.qrc:
1706         * inspector/front-end/inspector.html:
1707
1708 2011-02-07  Pavel Feldman  <pfeldman@chromium.org>
1709
1710         Reviewed by Yury Semikhatsky.
1711
1712         Web Inspector: "Reveal in elements panel" does not always work.
1713         https://bugs.webkit.org/show_bug.cgi?id=53775
1714
1715         * inspector/front-end/ConsoleView.js:
1716         (WebInspector.ConsoleView):
1717         * inspector/front-end/ContextMenu.js:
1718         (WebInspector.ContextMenu.prototype.show):
1719         * inspector/front-end/ElementsPanel.js:
1720         (WebInspector.ElementsPanel.prototype.switchToAndFocus):
1721         * inspector/front-end/ElementsTreeOutline.js:
1722         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired.focusElement):
1723         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
1724         * inspector/front-end/ObjectPropertiesSection.js:
1725         (WebInspector.ObjectPropertyTreeElement.prototype.update):
1726         (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired):
1727         * inspector/front-end/inspector.js:
1728         (WebInspector.cancelSearch):
1729
1730 2011-02-07  Adam Barth  <abarth@webkit.org>
1731
1732         Reviewed by Eric Seidel.
1733
1734         Relative .. in URL paths shouldn't skip adjacent / characters
1735         https://bugs.webkit.org/show_bug.cgi?id=53907
1736
1737         Our new behavior matches Firefox, Chrome, and IE.
1738
1739         * platform/KURL.cpp:
1740         (WebCore::copyPathRemovingDots):
1741
1742 2011-02-07  Maciej Stachowiak  <mjs@apple.com>
1743
1744         Reviewed by Antti Koivisto.
1745
1746         WebKitTestRunner does not block remote resources or complain about them
1747         https://bugs.webkit.org/show_bug.cgi?id=42139
1748         <rdar://problem/8183942>
1749
1750         * Configurations/WebCore.xcconfig: Allow WebKitTestRunner to link
1751         WebCore.
1752         * WebCore.exp.in: Export a handful of KURL symbols.
1753
1754 2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>
1755
1756         Reviewed by Darin Adler.
1757
1758         OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
1759         https://bugs.webkit.org/show_bug.cgi?id=52867
1760
1761         * ForwardingHeaders/wtf/OwnArrayPtrCommon.h: Removed.
1762         * bindings/v8/NPV8Object.cpp:
1763         (WebCore::createValueListFromVariantArgs): Returns PassOwnArrayPtr<v8::Handle<v8::Value>> instead of
1764         v8::Handle<v8::Value>*.
1765         (_NPN_Invoke): Calls createValueListFromVariantArgs.
1766         (_NPN_InvokeDefault): createValueListFromVariantArgs.
1767         (_NPN_Construct): createValueListFromVariantArgs.
1768         * bindings/v8/ScriptFunctionCall.cpp:
1769         (WebCore::ScriptFunctionCall::call): Calls adoptArrayPtr.
1770         (WebCore::ScriptFunctionCall::construct): Ditto.
1771         (WebCore::ScriptCallback::call):
1772         * bindings/v8/V8DOMWindowShell.cpp:
1773         (WebCore::V8DOMWindowShell::createNewContext): Ditto.
1774         * bindings/v8/V8NPObject.cpp:
1775         (WebCore::npObjectInvokeImpl): Ditto
1776         * bindings/v8/V8NodeFilterCondition.cpp:
1777         (WebCore::V8NodeFilterCondition::acceptNode): Ditto,
1778         * html/HTMLAreaElement.cpp:
1779         (WebCore::HTMLAreaElement::parseMappedAttribute): Calls newCoordsArray.
1780         * html/HTMLFrameSetElement.cpp:
1781         (WebCore::HTMLFrameSetElement::parseMappedAttribute): Calls newLengthArray.
1782         * html/canvas/WebGLRenderingContext.cpp:
1783         (WebCore::WebGLRenderingContext::getAttachedShaders): Calls adoptArraYptr.
1784         (WebCore::WebGLRenderingContext::simulateVertexAttrib0): Ditto.
1785         (WebCore::WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache): Dito.
1786         * platform/Length.cpp:
1787         (WebCore::newCoordsArray): Returns PassOwnArrayPtr<Length> instead of Length*.
1788         (WebCore::newLengthArray): Returns PassOwnArrayPtr<Length> instead of Length*.
1789         * platform/Length.h: Prototype changes.
1790         * platform/graphics/ANGLEWebKitBridge.cpp:
1791         (WebCore::ANGLEWebKitBridge::validateShaderSource): Calls adoptArrayPtr.
1792         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1793         (WebCore::getDirtyRects): Ditto.
1794         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
1795         (WebCore::ComplexTextController::getNormalizedTextRun): Ditto.
1796         * platform/graphics/chromium/HarfbuzzSkia.cpp:
1797         (WebCore::glyphsToAdvances): Ditto.
1798         (WebCore::canRender): Ditto.
1799         * platform/graphics/gpu/Texture.cpp:
1800         (WebCore::Texture::updateSubRect): Ditto.
1801         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1802         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): Ditto.
1803         * platform/graphics/skia/PlatformContextSkia.cpp:
1804         (WebCore::PlatformContextSkia::readbackHardwareToSoftware): Ditto.
1805         * platform/graphics/wince/SharedBitmap.cpp:
1806         (WebCore::SharedBitmap::to16bit): Ditto.
1807         * platform/win/ContextMenuWin.cpp:
1808         (WebCore::ContextMenu::getContextMenuItems): Ditto.
1809         * platform/win/LoggingWin.cpp:
1810         (WebCore::initializeWithUserDefault): Ditto.
1811         * plugins/win/PluginPackageWin.cpp:
1812         (WebCore::PluginPackage::fetchInfo): Ditto.
1813
1814 2011-02-06  Kent Tamura  <tkent@chromium.org>
1815
1816         Unreviewed.
1817
1818         * WebCore.xcodeproj/project.pbxproj: Run sort-xcode-project-file.
1819
1820 2011-02-03  Dominic Cooney  <dominicc@google.com>
1821
1822         Reviewed by Dimitri Glazkov.
1823
1824         Convert <keygen> option elements to a shadow DOM
1825         https://bugs.webkit.org/show_bug.cgi?id=51379
1826
1827         Covered by existing tests e.g. fast/html/keygen.html,
1828         html5lib/runner.html, etc.
1829
1830         * css/html.css:
1831         (form): Cleanup.
1832         (keygen, select): Border radii should match so focus ring looks good.
1833         (keygen::-webkit-keygen-select): No margin on the shadow element.
1834         (select): Hoisting border radius to keygen, select rule.
1835         * dom/SelectElement.cpp:
1836         (WebCore::toSelectElement): keygen is no longer a select element.
1837         * html/HTMLKeygenElement.cpp: Implements keygen shadow.
1838         (WebCore::KeygenSelectElement::create):
1839         (WebCore::KeygenSelectElement::shadowPseudoId):
1840         (WebCore::KeygenSelectElement::KeygenSelectElement):
1841         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
1842         (WebCore::HTMLKeygenElement::parseMappedAttribute):
1843         (WebCore::HTMLKeygenElement::appendFormData):
1844         (WebCore::HTMLKeygenElement::formControlType):
1845         (WebCore::HTMLKeygenElement::reset):
1846         (WebCore::HTMLKeygenElement::selectShadow):
1847         * html/HTMLKeygenElement.h: keygen is no longer a select on C++ side.
1848         (WebCore::HTMLKeygenElement::canStartSelection):
1849         (WebCore::HTMLKeygenElement::isEnumeratable):
1850         (WebCore::HTMLKeygenElement::isResettable):
1851         * html/HTMLOptionElement.cpp:
1852         (WebCore::HTMLOptionElement::ownerSelectElement): Only owned by selects.
1853         * html/HTMLSelectElement.cpp:
1854         (WebCore::HTMLSelectElement::HTMLSelectElement): Only 'select' tag name.
1855
1856 2011-02-06  Benjamin Poulain  <ikipou@gmail.com>
1857
1858         Reviewed by Kenneth Rohde Christiansen.
1859
1860         [Qt] Fix coding style errors in ClipboardQt.h
1861         https://bugs.webkit.org/show_bug.cgi?id=43520
1862
1863         Fix coding style: order of header and indentation.
1864
1865         * platform/qt/ClipboardQt.h:
1866         (WebCore::ClipboardQt::create):
1867         (WebCore::ClipboardQt::clipboardData):
1868         (WebCore::ClipboardQt::invalidateWritableData):
1869
1870 2011-02-06  Antti Koivisto  <antti@apple.com>
1871
1872         Reviewed by Maciej Stachowiak.
1873
1874         Use bloom filter for descendant selector filtering
1875         https://bugs.webkit.org/show_bug.cgi?id=53880
1876         
1877         Bloom filter is faster than a hash set in this kind of use.
1878         
1879         Shark thinks this speeds up style matching by ~30% on sites
1880         with lots of descendant selectors.
1881
1882         * ForwardingHeaders/wtf/BloomFilter.h: Added.
1883         * css/CSSStyleSelector.cpp:
1884         (WebCore::collectElementIdentifierHashes):
1885         (WebCore::CSSStyleSelector::pushParent):
1886         (WebCore::CSSStyleSelector::popParent):
1887         (WebCore::CSSStyleSelector::fastRejectSelector):
1888         (WebCore::RuleData::collectDescendantSelectorIdentifierHashes):
1889         * css/CSSStyleSelector.h:
1890
1891 2011-02-06  Maciej Stachowiak  <mjs@apple.com>
1892
1893         Reviewed by Antti Koivisto.
1894
1895         media/video-document-types.html sometimes crashes the WebProcess
1896         https://bugs.webkit.org/show_bug.cgi?id=53884
1897
1898         No new tests. Already covered by media/video-document-types.html
1899
1900         * html/HTMLMediaElement.cpp:
1901         (WebCore::HTMLMediaElement::userCancelledLoad): Stop the load timer
1902         when cancelling the load.
1903
1904 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
1905
1906         Reviewed by Adam Roben.
1907
1908         [WIN] Use WCHAR instead of TCHAR
1909         https://bugs.webkit.org/show_bug.cgi?id=53863
1910
1911         We always use the UNICODE versions of windows functions, so
1912         the usage of TCHAR makes no sense and mixing them is bad style.
1913
1914         * platform/graphics/win/IconWin.cpp:
1915         (WebCore::Icon::createIconForFiles):
1916         * platform/graphics/win/QTMovie.cpp:
1917         * platform/graphics/win/QTMovieGWorld.cpp:
1918         (QTMovieGWorld::fullscreenWndProc):
1919         (QTMovieGWorld::enterFullscreen):
1920         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1921         (WebCore::SimpleFontData::platformInit):
1922         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
1923         * platform/graphics/win/SimpleFontDataWin.cpp:
1924         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
1925         * platform/win/BString.cpp:
1926         * platform/win/ClipboardWin.cpp:
1927         (WebCore::filesystemPathFromUrlOrTitle):
1928         (WebCore::createGlobalHDropContent):
1929         (WebCore::createGlobalImageFileDescriptor):
1930         * platform/win/ContextMenuWin.cpp:
1931         * platform/win/CursorWin.cpp:
1932         (WebCore::loadSharedCursor):
1933         * platform/win/FileChooserWin.cpp:
1934         (WebCore::FileChooser::basenameForWidth):
1935         * platform/win/PopupMenuWin.cpp:
1936         (WebCore::PopupMenuWin::popupClassName):
1937         (WebCore::PopupMenuWin::show):
1938         * platform/win/PopupMenuWin.h:
1939
1940 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
1941
1942         Reviewed by Andreas Kling.
1943
1944         Replace FLT_MAX with std::numeric_limits
1945         https://bugs.webkit.org/show_bug.cgi?id=53861
1946
1947         Also move EFL's userIdleTime from TemporaryLinkStubs into SystemTimeEfl.
1948
1949         * html/NumberInputType.cpp:
1950         * html/parser/HTMLParserIdioms.cpp:
1951         (WebCore::parseToDoubleForNumberType):
1952         * platform/brew/SystemTimeBrew.cpp:
1953         (WebCore::userIdleTime):
1954         * platform/efl/SystemTimeEfl.cpp:
1955         (WebCore::userIdleTime):
1956         * platform/efl/TemporaryLinkStubs.cpp:
1957         * platform/graphics/ca/GraphicsLayerCA.cpp:
1958         (WebCore::GraphicsLayerCA::setupAnimation):
1959         * platform/win/SystemTimeWin.cpp:
1960         (WebCore::userIdleTime):
1961         * platform/wx/SystemTimeWx.cpp:
1962         (WebCore::userIdleTime):
1963
1964 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
1965
1966         Reviewed by Andreas Kling.
1967
1968         [CMake] Add dependencies for Visual Studio projects
1969         https://bugs.webkit.org/show_bug.cgi?id=53773
1970
1971         Add a JavaScriptCore dependecy to WebCore, so CMake can 
1972         generate the correct build order for the solution.
1973
1974         * CMakeLists.txt:
1975
1976 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
1977
1978         Reviewed by Andreas Kling.
1979
1980         [CMake] Unify ENABLE_SVG sections
1981         https://bugs.webkit.org/show_bug.cgi?id=53778
1982
1983         * CMakeLists.txt:
1984
1985 2011-02-06  Andreas Kling  <kling@webkit.org>
1986
1987         Reviewed by Dirk Schulze.
1988
1989         Refactor Font::normalizeSpaces() to avoid an extra String copy.
1990         https://bugs.webkit.org/show_bug.cgi?id=53871
1991
1992         Have normalizeSpaces() take UChar*,length arguments instead of a
1993         String, since all call sites were creating temporaries from these
1994         components anyway.
1995
1996         Font::normalizeSpaces() now always makes 1 String copy,
1997         instead of 1 in the best case and 2 in the worst case.
1998
1999         * platform/graphics/Font.cpp:
2000         (WebCore::Font::normalizeSpaces):
2001         * platform/graphics/Font.h:
2002         * platform/graphics/qt/FontQt.cpp:
2003         (WebCore::drawTextCommon):
2004         (WebCore::Font::floatWidthForSimpleText):
2005         (WebCore::Font::floatWidthForComplexText):
2006         (WebCore::Font::offsetForPositionForSimpleText):
2007         (WebCore::Font::offsetForPositionForComplexText):
2008         (WebCore::Font::selectionRectForSimpleText):
2009         (WebCore::Font::selectionRectForComplexText):
2010         * svg/SVGFont.cpp:
2011         (WebCore::SVGTextRunWalker::walk):
2012
2013 2011-02-06  Andreas Kling  <kling@webkit.org>
2014
2015         Reviewed by Dirk Schulze.
2016
2017         Fix potential buffer overrun in SVGTextRunWalker::walk()
2018         https://bugs.webkit.org/show_bug.cgi?id=53870
2019
2020         A new String was created from a UChar* with a 'length' argument
2021         that could be greater than the number of UChars available.
2022
2023         * svg/SVGFont.cpp:
2024         (WebCore::SVGTextRunWalker::walk):
2025
2026 2011-02-05  Adam Barth  <abarth@webkit.org>
2027
2028         Reviewed by Eric Seidel.
2029
2030         Remove unused parameter related to XSSAuditor
2031         https://bugs.webkit.org/show_bug.cgi?id=53862
2032
2033         * WebCore.exp.in:
2034         * bindings/ScriptControllerBase.cpp:
2035         (WebCore::ScriptController::executeScript):
2036         (WebCore::ScriptController::executeIfJavaScriptURL):
2037         * bindings/ScriptControllerBase.h:
2038         * bindings/js/ScriptController.cpp:
2039         (WebCore::ScriptController::evaluateInWorld):
2040         (WebCore::ScriptController::evaluate):
2041         (WebCore::ScriptController::executeScriptInWorld):
2042         * bindings/js/ScriptController.h:
2043         * bindings/v8/ScriptController.cpp:
2044         (WebCore::ScriptController::evaluate):
2045         * bindings/v8/ScriptController.h:
2046
2047 2011-02-05  Adam Barth  <abarth@webkit.org>
2048
2049         Fix Qt build.
2050
2051         * WebCore.pro:
2052
2053 2011-02-05  Adam Barth  <abarth@webkit.org>
2054
2055         Reviewed by Eric Seidel.
2056
2057         Delete XSSAuditor
2058         https://bugs.webkit.org/show_bug.cgi?id=53859
2059
2060         The job of the XSSAuditor is now done by the XSSFilter.  In the future,
2061         we might rename XSSFilter to XSSAuditor.
2062
2063         * Android.mk:
2064         * CMakeLists.txt:
2065         * GNUmakefile.am:
2066         * WebCore.gypi:
2067         * WebCore.vcproj/WebCore.vcproj:
2068         * WebCore.xcodeproj/project.pbxproj:
2069         * bindings/ScriptControllerBase.cpp:
2070         (WebCore::ScriptController::executeIfJavaScriptURL):
2071         * bindings/ScriptControllerBase.h:
2072         * bindings/js/ScriptController.cpp:
2073         (WebCore::ScriptController::ScriptController):
2074         (WebCore::ScriptController::evaluateInWorld):
2075         * bindings/js/ScriptController.h:
2076         * bindings/js/ScriptEventListener.cpp:
2077         (WebCore::createAttributeEventListener):
2078         * bindings/v8/ScriptController.cpp:
2079         (WebCore::ScriptController::ScriptController):
2080         (WebCore::ScriptController::evaluate):
2081         * bindings/v8/ScriptController.h:
2082         * bindings/v8/ScriptEventListener.cpp:
2083         (WebCore::createAttributeEventListener):
2084         * dom/Document.cpp:
2085         (WebCore::Document::implicitOpen):
2086         (WebCore::Document::processBaseElement):
2087         * dom/ScriptableDocumentParser.cpp:
2088         (WebCore::ScriptableDocumentParser::ScriptableDocumentParser):
2089         * dom/ScriptableDocumentParser.h:
2090         * html/parser/HTMLDocumentParser.cpp:
2091         (WebCore::HTMLDocumentParser::shouldLoadExternalScriptFromSrc):
2092         * loader/SubframeLoader.cpp:
2093         (WebCore::SubframeLoader::requestObject):
2094         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
2095         * page/XSSAuditor.cpp: Removed.
2096         * page/XSSAuditor.h: Removed.
2097
2098 2011-02-05  Anders Carlsson  <andersca@apple.com>
2099
2100         Reviewed by Darin Adler.
2101
2102         Need a way to resize and scroll the page at the same time
2103         https://bugs.webkit.org/show_bug.cgi?id=53814
2104         <rdar://problem/8498008>
2105
2106         Export a function needed by WebKit2.
2107
2108         * WebCore.exp.in:
2109
2110 2011-02-05  Patrick Gansterer  <paroga@webkit.org>
2111
2112         Reviewed by Alexey Proskuryakov.
2113
2114         Use Document::encoding() instead of DocumentWriter::encoding()
2115         https://bugs.webkit.org/show_bug.cgi?id=53398
2116
2117         This change makes the code more readable, when a subresource
2118         inherits the character encoding of the document.
2119
2120         * dom/ProcessingInstruction.cpp:
2121         (WebCore::ProcessingInstruction::checkStyleSheet):
2122         * dom/ScriptElement.cpp:
2123         (WebCore::ScriptElement::scriptCharset):
2124         * html/HTMLLinkElement.cpp:
2125         (WebCore::HTMLLinkElement::process):
2126         * loader/cache/CachedResourceLoader.cpp:
2127         (WebCore::CachedResourceLoader::requestPreload):
2128         * platform/network/FormDataBuilder.cpp:
2129         (WebCore::FormDataBuilder::encodingFromAcceptCharset):
2130
2131 2011-02-05  Adam Barth  <abarth@webkit.org>
2132
2133         Reviewed by Eric Seidel.
2134
2135         Introduce URLString to represent a canonicalized URL represented by a string
2136         https://bugs.webkit.org/show_bug.cgi?id=53847
2137
2138         Instead of using String all over the codebase to represent a URL,
2139         instead we should have a type to represent a canonicalized URL in the
2140         form of a string.  This patch introduces that type.
2141
2142         * GNUmakefile.am:
2143         * WebCore.gypi:
2144         * WebCore.xcodeproj/project.pbxproj:
2145         * platform/KURL.cpp:
2146         (WebCore::KURL::KURL):
2147         * platform/KURL.h:
2148         (WebCore::KURL::urlString):
2149
2150 2011-02-05  Robert Hogan  <robert@webkit.org>
2151
2152         Reviewed by Antonio Gomes.
2153
2154         [Qt] Style widgets not rendering
2155         https://bugs.webkit.org/show_bug.cgi?id=53849
2156
2157         * html/HTMLObjectElement.cpp:
2158         (WebCore::HTMLObjectElement::hasValidClassId): x-qt-styled-widget is a valid class id too
2159
2160 2011-02-05  Jochen Eisinger  <jochen@chromium.org>
2161
2162         Reviewed by Adam Barth.
2163
2164         Add ContentSecurityPolicy object to Document and pass the X-WebKit-CSP header from the MainResourceLoader.
2165         https://bugs.webkit.org/show_bug.cgi?id=53685
2166
2167         * WebCore.xcodeproj/project.pbxproj:
2168         * dom/Document.h:
2169         (WebCore::Document::contentSecurityPolicy):
2170         * loader/MainResourceLoader.cpp:
2171         (WebCore::MainResourceLoader::didReceiveResponse):
2172         * page/ContentSecurityPolicy.cpp:
2173         (WebCore::ContentSecurityPolicy::didReceiveHeader):
2174         * page/ContentSecurityPolicy.h:
2175
2176 2011-02-05  Eric Seidel  <eric@webkit.org>
2177
2178         Reviewed by Adam Barth.
2179
2180         Safari should lowercase schemes in cannonicalized urls to match every other browser
2181         https://bugs.webkit.org/show_bug.cgi?id=53848
2182
2183         We're clearly the odd man out here.  See results from every browser at:
2184         https://github.com/abarth/url-spec/blob/master/tests/gurl-results/by-browser.txt
2185
2186         * platform/KURL.cpp:
2187         (WebCore::KURL::parse):
2188          - Just lowercase the scheme when copying.
2189
2190 2011-02-05  Antti Koivisto  <antti@apple.com>
2191
2192         Reviewed by Dave Hyatt.
2193
2194         Optimize matching of descendant selectors
2195         https://bugs.webkit.org/show_bug.cgi?id=49876
2196         <rdar://problem/8772822>
2197         
2198         During style recalculation, maintain a filter of tags, ids and classes seen in ancestor elements.
2199         Use the filter to quickly reject descendant and child selectors when doing style matching.
2200
2201         This speeds up style recalculations 3-6x on many major web sites.
2202
2203         * css/CSSStyleSelector.cpp:
2204         (WebCore::RuleData::RuleData):
2205         (WebCore::RuleData::descendantSelectorIdentifierHashes):
2206         (WebCore::collectElementIdentifiers):
2207         (WebCore::CSSStyleSelector::pushParent):
2208         (WebCore::CSSStyleSelector::popParent):
2209         (WebCore::CSSStyleSelector::fastRejectSelector):
2210         (WebCore::CSSStyleSelector::matchRulesForList):
2211         (WebCore::RuleData::collectDescendantSelectorIdentifierHashes):
2212         * css/CSSStyleSelector.h:
2213         (WebCore::CSSStyleSelector::ParentStackFrame::ParentStackFrame):
2214         * dom/Element.cpp:
2215         (WebCore::StyleSelectorParentPusher::StyleSelectorParentPusher):
2216         (WebCore::StyleSelectorParentPusher::push):
2217         (WebCore::StyleSelectorParentPusher::~StyleSelectorParentPusher):
2218         (WebCore::Element::attach):
2219         (WebCore::Element::recalcStyle):
2220
2221 2011-02-05  Nate Chapin  <japhet@chromium.org>
2222
2223         Reviewed by Adam Barth.
2224
2225         Refactor: NotificationCenter shouldn't hold its own copy of the ScriptExecutionContext*
2226         when it inherits one from ActiveDOMObject.
2227         https://bugs.webkit.org/show_bug.cgi?id=53815
2228
2229         * bindings/js/JSDesktopNotificationsCustom.cpp:
2230         (WebCore::JSNotificationCenter::requestPermission):
2231         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
2232         (WebCore::V8NotificationCenter::requestPermissionCallback):
2233         * notifications/NotificationCenter.cpp:
2234         (WebCore::NotificationCenter::NotificationCenter):
2235         (WebCore::NotificationCenter::checkPermission):
2236         (WebCore::NotificationCenter::requestPermission):
2237         (WebCore::NotificationCenter::disconnectFrame):
2238         * notifications/NotificationCenter.h:
2239         (WebCore::NotificationCenter::createHTMLNotification):
2240         (WebCore::NotificationCenter::createNotification):
2241
2242 2011-02-04  Adam Barth  <abarth@webkit.org>
2243
2244         Reviewed by Maciej Stachowiak.
2245
2246         Crash in WebCore::TextEncoding::decode below XSSFilter::init
2247         https://bugs.webkit.org/show_bug.cgi?id=53837
2248
2249         Add missing null check.
2250
2251         Test: http/tests/security/xssAuditor/non-block-javascript-url-frame.html
2252
2253         * html/parser/XSSFilter.cpp:
2254         (WebCore::XSSFilter::init):
2255
2256 2011-02-04  Simon Fraser  <simon.fraser@apple.com>
2257
2258         Reviewed by Dan Bernstein.
2259
2260         Crashes in ShadowBlur via WebKit2 FindController
2261         https://bugs.webkit.org/show_bug.cgi?id=53830
2262         
2263         Fix a crash cause by re-entering ShadowBlur, and add assertions to
2264         detect when it happens.
2265         
2266         The re-entrancy occurred when drawRectShadowWithTiling() filled
2267         the interior of the shadow with fillRect() on the context
2268         which still had the shadow state set. This would make another ShadowBlur
2269         on the stack and call into the code again, potentially blowing away
2270         the image buffer.
2271         
2272         Fix by turning off shadows in the destination context while we're
2273         drawing the tiled shadow. The non-tiled code path already did this.
2274
2275         Not testable because CSS shadows clip out the inside of the rect
2276         being shadowed, and SVG uses fillPath, even for rects.
2277
2278         * platform/graphics/ShadowBlur.cpp:
2279         (WebCore::ScratchBuffer::ScratchBuffer):
2280         (WebCore::ScratchBuffer::getScratchBuffer):
2281         (WebCore::ScratchBuffer::scheduleScratchBufferPurge):
2282         (WebCore::ShadowBlur::ShadowBlur):
2283         (WebCore::ShadowBlur::drawRectShadowWithTiling):
2284
2285 2011-02-04  Carlos Garcia Campos  <cgarcia@igalia.com>
2286
2287         Reviewed by Martin Robinson.
2288
2289         [GTK] Don't use a fixed size for search field icons
2290         https://bugs.webkit.org/show_bug.cgi?id=50624
2291
2292         Use the parent input content box to make sure the icon fits in the
2293         search field, scaling it down when needed.
2294
2295         * platform/gtk/RenderThemeGtk.cpp:
2296         (WebCore::paintGdkPixbuf):
2297         (WebCore::getIconSizeForPixelSize):
2298         (WebCore::adjustSearchFieldIconStyle):
2299         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationStyle):
2300         (WebCore::centerRectVerticallyInParentInputElement):
2301         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
2302         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
2303         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
2304         (WebCore::RenderThemeGtk::paintCapsLockIndicator):
2305         (WebCore::RenderThemeGtk::paintMediaButton):
2306
2307 2011-02-04  Hironori Bono  <hbono@chromium.org>
2308
2309         Reviewed by Adam Barth.
2310
2311         [chromium] JPEG corruption
2312         https://bugs.webkit.org/show_bug.cgi?id=53250
2313
2314         Same as gray-scale JPEGs, we convert the colors of CMYK JPEGs with color
2315         profiles from CMYK to RGB twice and it causes color corruption. This
2316         change suppresses the color profiles for CMYK JPEGs same as gray-scale
2317         ones.
2318
2319         Test: fast/images/cmyk-jpeg-with-color-profile.html
2320
2321         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2322         (WebCore::JPEGImageReader::decode):
2323
2324 2011-02-04  Xiyuan Xia  <xiyuan@chromium.org>
2325
2326         Reviewed by Tony Chang.
2327
2328         [Chromium] Option text in select popup does not align with menulist button text
2329         https://bugs.webkit.org/show_bug.cgi?id=53632
2330
2331         This makes clientPaddingLeft and  clientPaddingRight return
2332         the additional m_innerBlock's padding so that the popup item text
2333         aligns with the menulist button text.
2334
2335         * rendering/RenderMenuList.cpp:
2336         (WebCore::RenderMenuList::clientPaddingLeft):
2337         (WebCore::RenderMenuList::clientPaddingRight):
2338
2339 2011-02-04  Anders Carlsson  <andersca@apple.com>
2340
2341         Reviewed by Sam Weinig and Beth Dakin.
2342
2343         REGRESSION: Horizontal scrollbar thumbs leave artifacts over page content when scrolling vertically
2344         <rdar://problem/8962457>
2345
2346         * platform/ScrollView.cpp:
2347         (WebCore::ScrollView::scrollContents):
2348         Subtract scrollbars from the scroll view rect if overlay scrollers are enabled.
2349         
2350         * platform/ScrollableArea.cpp:
2351         (WebCore::ScrollableArea::setScrollOffsetFromAnimation):
2352         Make sure to invalidate both scrollbars if overlay scrollers are enabled.
2353
2354 2011-02-04  Adam Barth  <abarth@webkit.org>
2355
2356         Reviewed by Eric Seidel.
2357
2358         PluginDocuments don't create widgets for plugins on back/forward
2359         https://bugs.webkit.org/show_bug.cgi?id=53474
2360
2361         Long ago, PluginDocument always caused the HTMLEmbedElement to create
2362         its widget synchronously during a post-layout task.  Recently, however,
2363         some changes to the HistroyController caused layout on back/forward to
2364         become slightly more complicated (and added an extra level of recursion
2365         to layout).  This extra level of recursion triggered the "I've recursed
2366         too many times" condition in the post-layout task queue, causing the
2367         FrameView to run the remainder of the tasks asynchronously.
2368         Unfortunately, that broke PluginDocument because it needs its the
2369         HTMLEmbedElement's updateWidget task to run synchronously.
2370
2371         This patch adds a mechanism for "kicking off" the pending post-layout
2372         tasks synchronously (instead of waiting for the timer to fire).
2373         PluginDocument then uses that facility to ensure that the
2374         HTMLEmbedElement's updateWidget task happens.
2375
2376         Test: plugins/plugin-document-back-forward.html
2377
2378         * html/PluginDocument.cpp:
2379         (WebCore::PluginDocumentParser::appendBytes):
2380         * page/FrameView.cpp:
2381         (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
2382         * page/FrameView.h:
2383
2384 2011-02-04  Charlie Reis  <creis@chromium.org>
2385
2386         Reviewed by Mihai Parparita.
2387
2388         Crash in WebCore::HistoryController::itemsAreClones
2389         https://bugs.webkit.org/show_bug.cgi?id=52819
2390
2391         Avoids deleting the current HistoryItem while it is still in use.
2392         Ensures that provisional items are committed for same document navigations.
2393         Ensures that error pages are committed on back/forward navigations.
2394         Also removes unneeded sanity checks used for diagnosing the problem.
2395
2396         * loader/HistoryController.cpp:
2397         * loader/HistoryController.h:
2398
2399 2011-02-04  Carol Szabo  <carol.szabo@nokia.com>
2400
2401         Reviewed by David Hyatt.
2402
2403         Code Changes.
2404
2405         CSS 2.1 failure: content-*
2406         https://bugs.webkit.org/show_bug.cgi?id=52126
2407
2408         Test: fast/css/counters/content-021.html
2409
2410         * rendering/CounterNode.cpp:
2411         (showCounterTree):
2412         Made parameter const because it is supposed to be so.
2413         * rendering/RenderCounter.cpp:
2414         (WebCore::previousInPreOrder):
2415         (WebCore::previousSiblingOrParent):
2416         (WebCore::parentElement):
2417         (WebCore::areRenderersElementsSiblings):
2418         (WebCore::nextInPreOrder):
2419         Added these local helper functions to help navigate the DOM tree
2420         enriched with :before and :after pseudo elements.
2421         (WebCore::planCounter):
2422         Fixed bug that would create a repeat counter for second and
2423         subsequent renderers associated with the same DOM element.
2424         (WebCore::findPlaceForCounter):
2425         (WebCore::makeCounterNode):
2426         Changed to use the new tree navigation functions described above
2427         instead of the Renderer Tree navigation functions.
2428         (WebCore::RenderCounter::rendererSubtreeAttached):
2429         (WebCore::RenderCounter::rendererStyleChanged):
2430         Optimized to not bother about counters until the renderers are
2431         finally attached.
2432         (showRendererTree):
2433         (showNodeTree):
2434         Debug helper functions used to debug Counter bugs.
2435
2436 2011-02-04  Dan Bernstein  <mitz@apple.com>
2437
2438         Typo fix.
2439
2440         * html/parser/XSSFilter.cpp:
2441         (WebCore::HTMLNames::containsJavaScriptURL):
2442
2443 2011-02-04  Dan Bernstein  <mitz@apple.com>
2444
2445         Reviewed by Anders Carlsson.
2446
2447         Make an infinite loop introduced in r77454 finite.
2448
2449         * html/parser/XSSFilter.cpp:
2450         (WebCore::HTMLNames::containsJavaScriptURL):
2451
2452 2011-02-04  Jer Noble  <jer.noble@apple.com>
2453
2454         Reviewed by Eric Carlson.
2455
2456         Frame accurate seeking isn't always accurate
2457         https://bugs.webkit.org/show_bug.cgi?id=52697
2458
2459         Test: media/video-frame-accurate-seek.html
2460
2461         Make seeking slightly more accurate by rounding instead of truncating
2462         when converting from seconds-in-float to time/timeScale.
2463
2464         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2465         (WebCore::MediaPlayerPrivateQTKit::createQTTime):
2466         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2467         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::mediaTimeForTimeValue):
2468         * platform/graphics/win/QTMovie.cpp:
2469         (QTMovie::setCurrentTime):
2470
2471 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
2472
2473         Reviewed by Nate Chapin.
2474
2475         Second IndexedDB events overhaul patch
2476         https://bugs.webkit.org/show_bug.cgi?id=53813
2477
2478         If an IDBRequest has a IDBTransaction, it should propogate
2479         events through it. In order to do this, IDBRequest needs to
2480         hold a transaction frontend object rather than a backend one.
2481
2482         Test: storage/indexeddb/request-event-propagation.html
2483
2484         * storage/IDBCursor.cpp:
2485         (WebCore::IDBCursor::IDBCursor):
2486         * storage/IDBCursor.h:
2487         (WebCore::IDBCursor::create):
2488         * storage/IDBDatabase.cpp:
2489         (WebCore::IDBDatabase::setSetVersionTransaction):
2490         (WebCore::IDBDatabase::createObjectStore):
2491         (WebCore::IDBDatabase::deleteObjectStore):
2492         * storage/IDBDatabase.h:
2493         * storage/IDBIndex.cpp:
2494         (WebCore::IDBIndex::IDBIndex):
2495         (WebCore::IDBIndex::openCursor):
2496         (WebCore::IDBIndex::openKeyCursor):
2497         (WebCore::IDBIndex::get):
2498         (WebCore::IDBIndex::getKey):
2499         * storage/IDBIndex.h:
2500         (WebCore::IDBIndex::create):
2501         * storage/IDBObjectStore.cpp:
2502         (WebCore::IDBObjectStore::IDBObjectStore):
2503         (WebCore::IDBObjectStore::get):
2504         (WebCore::IDBObjectStore::add):
2505         (WebCore::IDBObjectStore::put):
2506         (WebCore::IDBObjectStore::deleteFunction):
2507         (WebCore::IDBObjectStore::createIndex):
2508         (WebCore::IDBObjectStore::deleteIndex):
2509         (WebCore::IDBObjectStore::openCursor):
2510         * storage/IDBObjectStore.h:
2511         (WebCore::IDBObjectStore::create):
2512         * storage/IDBRequest.cpp:
2513         (WebCore::IDBRequest::create):
2514         (WebCore::IDBRequest::IDBRequest):
2515         (WebCore::IDBRequest::resetReadyState):
2516         (WebCore::IDBRequest::onSuccess):
2517         (WebCore::IDBRequest::dispatchEvent):
2518         * storage/IDBRequest.h:
2519         * storage/IDBTransaction.cpp:
2520         (WebCore::IDBTransaction::IDBTransaction):
2521         (WebCore::IDBTransaction::objectStore):
2522         (WebCore::IDBTransaction::contextDestroyed):
2523         (WebCore::IDBTransaction::enqueueEvent):
2524         * storage/IDBTransaction.h:
2525         * storage/IDBTransaction.idl:
2526
2527 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
2528
2529         Reviewed by Nate Chapin.
2530
2531         First step towards event propogation within IndexedDB
2532         https://bugs.webkit.org/show_bug.cgi?id=53795
2533
2534         This is the first step towards implementing
2535         http://www.w3.org/Bugs/Public/show_bug.cgi?id=11348
2536         within IndexedDB. I've created a method that knows how
2537         to capture and bubble (based on Node's dispatchGenericEvent).
2538         I've then changed IDBRequest to use it.
2539
2540         The only functional change is that preventDefault now must
2541         be called in error events to prevent the transaction from
2542         being aborted. The tests reflect this change and there's one
2543         specific test to look at this behavior.
2544
2545         Test: storage/indexeddb/error-causes-abort-by-default.html
2546
2547         * storage/IDBAbortEvent.cpp:
2548         (WebCore::IDBAbortEvent::create):
2549         (WebCore::IDBAbortEvent::IDBAbortEvent):
2550         * storage/IDBAbortEvent.h:
2551         * storage/IDBCompleteEvent.cpp:
2552         (WebCore::IDBCompleteEvent::create):
2553         (WebCore::IDBCompleteEvent::IDBCompleteEvent):
2554         * storage/IDBCompleteEvent.h:
2555         * storage/IDBErrorEvent.cpp:
2556         (WebCore::IDBErrorEvent::IDBErrorEvent):
2557         * storage/IDBEvent.cpp:
2558         (WebCore::IDBEvent::IDBEvent):
2559         (WebCore::IDBEvent::dispatch):
2560         * storage/IDBEvent.h:
2561         * storage/IDBRequest.cpp:
2562         (WebCore::IDBRequest::dispatchEvent):
2563         * storage/IDBRequest.h:
2564         * storage/IDBSuccessEvent.cpp:
2565         (WebCore::IDBSuccessEvent::IDBSuccessEvent):
2566         * storage/IDBTransaction.cpp:
2567         (WebCore::IDBTransaction::onAbort):
2568         (WebCore::IDBTransaction::onComplete):
2569         * storage/IDBTransaction.h:
2570         (WebCore::IDBTransaction::backend):
2571         * storage/IDBTransactionBackendImpl.cpp:
2572         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
2573
2574 2011-02-04  Daniel Cheng  <dcheng@chromium.org>
2575
2576         Reviewed by Dmitry Titov.
2577
2578         Clone WebClipboard to be frame-specific.
2579         https://bugs.webkit.org/show_bug.cgi?id=53727
2580
2581         For drop operations, Chrome currently snapshots the data and copies it
2582         into the renderer process. As we add more supported drag data types, the
2583         copy will become increasingly expensive. Instead, we'd like to snapshot
2584         data in the browser to reduce the amount of data copied and to support
2585         Blob in DataTransferItem. In order to allow this, we associated
2586         WebClipboard with a frame so it can correctly route its IPCs to the
2587         corresponding Chromium host.
2588
2589         No new tests because no new functionality.
2590
2591         * platform/chromium/ChromiumDataObject.cpp:
2592         (WebCore::ChromiumDataObject::createReadable):
2593         * platform/chromium/ChromiumDataObject.h:
2594         * platform/chromium/ClipboardChromium.cpp:
2595         (WebCore::ClipboardChromium::create):
2596         * platform/chromium/PlatformBridge.h:
2597         * platform/chromium/ReadableDataObject.cpp:
2598         (WebCore::ReadableDataObject::create):
2599         (WebCore::ReadableDataObject::ReadableDataObject):
2600         (WebCore::ReadableDataObject::getData):
2601         (WebCore::ReadableDataObject::urlTitle):
2602         (WebCore::ReadableDataObject::htmlBaseUrl):
2603         (WebCore::ReadableDataObject::filenames):
2604         (WebCore::ReadableDataObject::ensureTypeCacheInitialized):
2605         * platform/chromium/ReadableDataObject.h:
2606
2607 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
2608
2609         Revert https://bugs.webkit.org/show_bug.cgi?id=53795
2610
2611         * storage/IDBAbortEvent.cpp:
2612         (WebCore::IDBAbortEvent::create):
2613         (WebCore::IDBAbortEvent::IDBAbortEvent):
2614         * storage/IDBAbortEvent.h:
2615         * storage/IDBCompleteEvent.cpp:
2616         (WebCore::IDBCompleteEvent::create):
2617         (WebCore::IDBCompleteEvent::IDBCompleteEvent):
2618         * storage/IDBCompleteEvent.h:
2619         * storage/IDBErrorEvent.cpp:
2620         (WebCore::IDBErrorEvent::IDBErrorEvent):
2621         * storage/IDBEvent.cpp:
2622         (WebCore::IDBEvent::IDBEvent):
2623         * storage/IDBEvent.h:
2624         * storage/IDBRequest.cpp:
2625         (WebCore::IDBRequest::dispatchEvent):
2626         * storage/IDBRequest.h:
2627         * storage/IDBSuccessEvent.cpp:
2628         (WebCore::IDBSuccessEvent::IDBSuccessEvent):
2629         * storage/IDBTransaction.cpp:
2630         (WebCore::IDBTransaction::onAbort):
2631         (WebCore::IDBTransaction::onComplete):
2632         * storage/IDBTransaction.h:
2633         * storage/IDBTransactionBackendImpl.cpp:
2634         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
2635
2636 2011-02-04  Martin Galpin  <martin@66laps.com>
2637
2638         Reviewed by David Levin.
2639
2640         CORS origin header not set on GET when a preflight request is required.
2641         https://bugs.webkit.org/show_bug.cgi?id=50773
2642         
2643         Test: http/tests/xmlhttprequest/cross-origin-preflight-get.html
2644
2645         * loader/DocumentThreadableLoader.cpp:
2646         (WebCore::DocumentThreadableLoader::preflightSuccess): 
2647         Explicitly set the request origin after a preflight request succeeds.
2648
2649 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
2650
2651         Reviewed by Nate Chapin.
2652
2653         First step towards event propogation within IndexedDB
2654         https://bugs.webkit.org/show_bug.cgi?id=53795
2655
2656         This is the first step towards implementing
2657         http://www.w3.org/Bugs/Public/show_bug.cgi?id=11348
2658         within IndexedDB. I've created a method that knows how
2659         to capture and bubble (based on Node's dispatchGenericEvent).
2660         I've then changed IDBRequest to use it.
2661
2662         The only functional change is that preventDefault now must
2663         be called in error events to prevent the transaction from
2664         being aborted. The tests reflect this change and there's one
2665         specific test to look at this behavior.
2666
2667         Test: storage/indexeddb/error-causes-abort-by-default.html
2668
2669         * storage/IDBAbortEvent.cpp:
2670         (WebCore::IDBAbortEvent::create):
2671         (WebCore::IDBAbortEvent::IDBAbortEvent):
2672         * storage/IDBAbortEvent.h:
2673         * storage/IDBCompleteEvent.cpp:
2674         (WebCore::IDBCompleteEvent::create):
2675         (WebCore::IDBCompleteEvent::IDBCompleteEvent):
2676         * storage/IDBCompleteEvent.h:
2677         * storage/IDBErrorEvent.cpp:
2678         (WebCore::IDBErrorEvent::IDBErrorEvent):
2679         * storage/IDBEvent.cpp:
2680         (WebCore::IDBEvent::IDBEvent):
2681         (WebCore::IDBEvent::dispatch):
2682         * storage/IDBEvent.h:
2683         * storage/IDBRequest.cpp:
2684         (WebCore::IDBRequest::dispatchEvent):
2685         * storage/IDBRequest.h:
2686         * storage/IDBSuccessEvent.cpp:
2687         (WebCore::IDBSuccessEvent::IDBSuccessEvent):
2688         * storage/IDBTransaction.cpp:
2689         (WebCore::IDBTransaction::onAbort):
2690         (WebCore::IDBTransaction::onComplete):
2691         * storage/IDBTransaction.h:
2692         (WebCore::IDBTransaction::backend):
2693         * storage/IDBTransactionBackendImpl.cpp:
2694         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
2695
2696 2011-02-04  Dimitri Glazkov  <dglazkov@chromium.org>
2697
2698         Reviewed by Csaba Osztrogonác.
2699
2700         [Qt]REGRESSION(r76951): media/controls-without-preload.html fails
2701         https://bugs.webkit.org/show_bug.cgi?id=53674
2702
2703         * css/mediaControlsQt.css:
2704
2705 2011-02-04  Dan Bernstein  <mitz@apple.com>
2706
2707         Reviewed by Darin Adler and Dave Hyatt.
2708
2709         <rdar://problem/8902704> Make ruby text size 50% by default
2710         https://bugs.webkit.org/show_bug.cgi?id=53723
2711
2712         * css/html.css:
2713         (ruby > rt): Changed the font-size from 60% to 50%.
2714
2715 2011-02-04  Antti Koivisto  <antti@apple.com>
2716
2717         Reviewed by Dimitri Glazkov.
2718
2719         https://bugs.webkit.org/show_bug.cgi?id=53610
2720         Regression: adjacent sibling selector not working as expected
2721         <rdar://problem/8960033>
2722         
2723         https://bugs.webkit.org/show_bug.cgi?id=53574
2724         REGRESSION (r76012): :last-child:after not working as expected
2725         <rdar://problem/8948643>
2726         
2727         Test for additional conditions in parent style that prevent sharing.
2728
2729         Tests: fast/selectors/style-sharing-adjacent-selector.html
2730                fast/selectors/style-sharing-last-child.html
2731
2732         * css/CSSStyleSelector.cpp:
2733         (WebCore::parentStylePreventsSharing):
2734         (WebCore::CSSStyleSelector::locateSharedStyle):
2735
2736 2011-02-04  Mark Mentovai  <mark@chromium.org>
2737
2738         Reviewed by Dimitri Glazkov.
2739
2740         Chromium GYP build fix.
2741
2742         When various settings were moved to webcore_prerequisites in r66364,
2743         things that should have been direct_dependent_settings were not marked
2744         as such. GYP 'defines', for example, make no sense on a 'none'-type
2745         target such as webcore_prerequisites. It appears that it was intended
2746         for these settings to be pushed to direct dependents, which would make
2747         direct_dependent_settings correct.
2748
2749         Losing the ChromiumWebCoreObjC defines on the Mac, for example, caused
2750         http://crbug.com/71537, which at best causes Mac console log spew, and
2751         at worst may result in Chromium's copy of WebCore using system
2752         definitions of certain Objective-C classes at runtime, or vice-versa.
2753
2754         The build now includes a postbuild step to prevent
2755         http://crbug.com/71537 from regressing again. The build will fail upon
2756         regression.
2757
2758         https://bugs.webkit.org/show_bug.cgi?id=53630
2759
2760         * WebCore.gyp/WebCore.gyp: Move things in webcore_prerequisites into
2761           direct_dependent_settings as needed, add the check_objc_rename
2762           postbuild step.
2763         * WebCore.gyp/mac/check_objc_rename.sh: Added.
2764
2765 2011-02-04  Robert Hogan  <robert@webkit.org>
2766
2767         Reviewed by Darin Fisher.
2768
2769         Move chromium iframe shim code to cross-platform file
2770         https://bugs.webkit.org/show_bug.cgi?id=52594
2771
2772         Move Chromium code for identifying and cutting out
2773         iframe shims from plugins to cross-platform utility file
2774         IFrameShimSupport.cpp.
2775         Amend PluginViewQt to use this code to handle shims correctly.
2776
2777         * WebCore.gypi: Add Chromium support for IFrameShimSupport.cpp
2778         * WebCore.pro: Add Qt support for IFrameShimSupport.cpp
2779         * plugins/IFrameShimSupport.cpp: Added.
2780         (WebCore::getObjectStack):
2781         (WebCore::iframeIsAbovePlugin):
2782         (WebCore::getPluginOcclusions):
2783         * plugins/IFframeShimSupport.h: Added.
2784         * plugins/qt/PluginViewQt.cpp:
2785         (WebCore::PluginView::setNPWindowIfNeeded):
2786
2787 2011-02-04  Xiaomei Ji  <xji@chromium.org>
2788
2789         Reviewed by David Levin.
2790
2791         Implement "<option> should implement the dir attribute" for chromium port after r76983.
2792         https://bugs.webkit.org/show_bug.cgi?id=50969
2793
2794         Use manual test Source/WebCore/manual-tests/pop-up-alignment-and-direction.html
2795         added in r76983.
2796
2797         * platform/chromium/PopupMenuChromium.cpp: Remove directionality hint from
2798         <select> drop-down setting.
2799         (WebCore::PopupListBox::paintRow): Use <option>'s directionality to paint
2800         items in drop-down and pass-in bidi override flag when creating text run.
2801         * platform/chromium/PopupMenuChromium.h: Remove directionalityHint from
2802         PopupContainerSettings.
2803
2804 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
2805
2806         Build fix from merge mistake.
2807
2808         * storage/IDBTransaction.cpp:
2809         (WebCore::IDBTransaction::ensureEventTargetData):
2810
2811 2011-02-04  Levi Weintraub  <leviw@chromium.org>
2812
2813         Reviewed by Darin Adler.
2814
2815         Remove unneeded function declarations in comments in EditorClient.h
2816         https://bugs.webkit.org/show_bug.cgi?id=53745
2817
2818         Removing unused commented out function declarations. No tests since this is just cleanup.
2819
2820         * page/EditorClient.h:
2821
2822 2011-02-03  Jeremy Orlow  <jorlow@chromium.org>
2823
2824         Reviewed by Nate Chapin.
2825
2826         Refactor IDBRequest and IDBTransaction a bit
2827         https://bugs.webkit.org/show_bug.cgi?id=53565
2828
2829         There were a lot of subtle issues with the way IDBTransaction
2830         and IDBRequest used to be written. This cleans a lot of them up
2831         and largely simplifies the logic. Using EventQueue rather than
2832         timers is one example of the simplification.
2833
2834         * bindings/scripts/CodeGeneratorV8.pm:
2835         * dom/EventQueue.cpp:
2836         (WebCore::EventQueue::enqueueEvent):
2837         (WebCore::EventQueue::dispatchEvent):
2838         * storage/IDBCursor.cpp:
2839         (WebCore::IDBCursor::continueFunction):
2840         * storage/IDBRequest.cpp:
2841         (WebCore::IDBRequest::create):
2842         (WebCore::IDBRequest::IDBRequest):
2843         (WebCore::IDBRequest::resetReadyState):
2844         (WebCore::IDBRequest::onError):
2845         (WebCore::IDBRequest::onSuccess):
2846         (WebCore::IDBRequest::dispatchEvent):
2847         (WebCore::IDBRequest::enqueueEvent):
2848         (WebCore::IDBRequest::eventTargetData):
2849         (WebCore::IDBRequest::ensureEventTargetData):
2850         * storage/IDBRequest.h:
2851         (WebCore::IDBRequest::dispatchEvent):
2852         * storage/IDBTransaction.cpp:
2853         (WebCore::IDBTransaction::create):
2854         (WebCore::IDBTransaction::IDBTransaction):
2855         (WebCore::IDBTransaction::objectStore):
2856         (WebCore::IDBTransaction::abort):
2857         (WebCore::IDBTransaction::onAbort):
2858         (WebCore::IDBTransaction::onComplete):
2859         (WebCore::IDBTransaction::onTimeout):
2860         (WebCore::IDBTransaction::canSuspend):
2861         (WebCore::IDBTransaction::stop):
2862         (WebCore::IDBTransaction::enqueueEvent):
2863         (WebCore::IDBTransaction::eventTargetData):
2864         (WebCore::IDBTransaction::ensureEventTargetData):
2865         * storage/IDBTransaction.h:
2866
2867 2011-02-01  Jeremy Orlow  <jorlow@chromium.org>
2868
2869         Reviewed by Nate Chapin.
2870
2871         Remove the timeout event from IndexedDB
2872         https://bugs.webkit.org/show_bug.cgi?id=53521
2873
2874         Remove timeout and ontimeout from IDBTransaction per the spec.
2875
2876         * WebCore.gypi:
2877         * storage/IDBDatabase.cpp:
2878         (WebCore::IDBDatabase::transaction):
2879         * storage/IDBDatabase.h:
2880         (WebCore::IDBDatabase::transaction):
2881         * storage/IDBDatabase.idl:
2882         * storage/IDBDatabaseBackendImpl.cpp:
2883         (WebCore::IDBDatabaseBackendImpl::setVersion):
2884         (WebCore::IDBDatabaseBackendImpl::transaction):
2885         * storage/IDBDatabaseBackendImpl.h:
2886         * storage/IDBDatabaseBackendInterface.h:
2887         * storage/IDBTimeoutEvent.cpp: Removed.
2888         * storage/IDBTimeoutEvent.h: Removed.
2889         * storage/IDBTransaction.cpp:
2890         (WebCore::IDBTransaction::IDBTransaction):
2891         (WebCore::IDBTransaction::onAbort):
2892         (WebCore::IDBTransaction::onComplete):
2893         * storage/IDBTransaction.h:
2894         * storage/IDBTransaction.idl:
2895         * storage/IDBTransactionBackendImpl.cpp:
2896         (WebCore::IDBTransactionBackendImpl::create):
2897         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
2898         * storage/IDBTransactionBackendImpl.h:
2899         * storage/IDBTransactionCallbacks.h:
2900
2901 2011-02-04  Chris Fleizach  <cfleizach@apple.com>
2902
2903         Reviewed by Darin Adler.
2904
2905         AX: Can't set accessibility overridden attributes on web objects
2906         https://bugs.webkit.org/show_bug.cgi?id=53725
2907
2908         accessibilitySetOverriddenValue does not work on AX objects from WebCore because 
2909         the right method needed to be overridden (accessibilitySupportsOverriddenAttributes).
2910         Unfortunately, there's no way to test this from DRT, since AppKit returns the overridden
2911         attribute only when an AX client asks for it through the AX frameworks.
2912
2913         * accessibility/mac/AccessibilityObjectWrapper.mm:
2914         (-[AccessibilityObjectWrapper accessibilitySupportsOverriddenAttributes]):
2915
2916 2011-02-03  Dimitri Glazkov  <dglazkov@chromium.org>
2917
2918         Reviewed by Kent Tamura.
2919
2920         REGRESSION(r76147): Slider thumb is not repainted when let go outside of the slider track.
2921         https://bugs.webkit.org/show_bug.cgi?id=53691
2922
2923         Test: fast/repaint/slider-thumb-drag-release.html
2924
2925         * html/shadow/SliderThumbElement.cpp:
2926         (WebCore::SliderThumbElement::stopDragging): Added dirtying the layout bit to ensure
2927             that the thumb is repainted.
2928
2929 2011-02-04  Mikhail Naganov  <mnaganov@chromium.org>
2930
2931         Reviewed by Pavel Feldman.
2932
2933         Web Inspector: Add "show more" data grid node and waiting message UI components.
2934         https://bugs.webkit.org/show_bug.cgi?id=53763
2935
2936         - "show more" data grid node is used for on-demand population of
2937         data grid contents (similar to DOM tree capability for limiting
2938         displayed nodes count);
2939
2940         - waiting message is used for informing user about long lasting
2941         operations (with a possibility to cancel them).
2942
2943         * English.lproj/localizedStrings.js:
2944         * WebCore.gypi:
2945         * WebCore.vcproj/WebCore.vcproj:
2946         * inspector/front-end/PleaseWaitMessage.js: Added.
2947         (WebInspector.PleaseWaitMessage):
2948         * inspector/front-end/ShowMoreDataGridNode.js: Added.
2949         (WebInspector.ShowMoreDataGridNode):
2950         * inspector/front-end/WebKit.qrc:
2951         * inspector/front-end/inspector.css:
2952         (.data-grid button):
2953         (.please-wait-msg):
2954         * inspector/front-end/inspector.html:
2955
2956 2011-02-04  Adele Peterson  <adele@apple.com>
2957
2958         Reviewed by Dan Bernstein.
2959
2960         Fix for https://bugs.webkit.org/show_bug.cgi?id=53740
2961         <rdar://problem/8503629> Allow platforms to specify if the placeholder should be visible when text controls are focused
2962
2963         Tests:
2964         fast/forms/textarea-placeholder-visibility-1.html
2965         fast/forms/textarea-placeholder-visibility-2.html
2966         fast/forms/input-placeholder-visibility-1.html
2967         fast/forms/input-placeholder-visibility-2.html
2968         fast/forms/input-placeholder-visibility-3.html
2969
2970         * html/HTMLFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
2971         Add a check for shouldShowPlaceholderWhenFocused.
2972         * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::updateValue):
2973         Whenever the value is updated, we should also update placeholder visibility.
2974         * rendering/RenderTheme.h: (WebCore::RenderTheme::shouldShowPlaceholderWhenFocused):
2975         Make the default the same as the existing behavior.
2976         * rendering/RenderThemeMac.h:
2977         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
2978         Show placeholder when appropriate. 
2979
2980 2011-02-04  Pavel Podivilov  <podivilov@chromium.org>
2981
2982         Reviewed by Pavel Feldman.
2983
2984         Web Inspector: evaluate on hover does not work on a breakpoint.
2985         https://bugs.webkit.org/show_bug.cgi?id=53768
2986
2987         * inspector/front-end/SourceFrame.js:
2988         (WebInspector.SourceFrame.prototype._mouseHover):
2989
2990 2011-02-04  Sheriff Bot  <webkit.review.bot@gmail.com>
2991
2992         Unreviewed, rolling out r77625 and r77626.
2993         http://trac.webkit.org/changeset/77625
2994         http://trac.webkit.org/changeset/77626
2995         https://bugs.webkit.org/show_bug.cgi?id=53765
2996
2997         It broke Windows builds (Requested by Ossy_ on #webkit).
2998
2999         * Android.jscbindings.mk:
3000         * CMakeLists.txt:
3001         * ForwardingHeaders/pcre/pcre.h: Added.
3002         * ForwardingHeaders/yarr/Yarr.h: Removed.
3003         * ForwardingHeaders/yarr/YarrInterpreter.h: Removed.
3004         * ForwardingHeaders/yarr/YarrPattern.h: Removed.
3005         * WebCore.gyp/WebCore.gyp:
3006         * WebCore.pro:
3007         * WebCore.vcproj/WebCore.vcproj:
3008         * WebCore.vcproj/copyForwardingHeaders.cmd:
3009         * platform/text/RegularExpression.cpp:
3010         (WebCore::RegularExpression::Private::regexp):
3011         (WebCore::RegularExpression::Private::compile):
3012         (WebCore::RegularExpression::Private::Private):
3013         (WebCore::RegularExpression::Private::create):
3014         (WebCore::RegularExpression::Private::~Private):
3015         (WebCore::RegularExpression::match):
3016
3017 2011-02-04  Peter Varga  <pvarga@webkit.org>
3018
3019         Rubber-stamped by Csaba Osztrogonác.
3020
3021         Replace PCRE with Yarr in WebCore
3022         https://bugs.webkit.org/show_bug.cgi?id=53496
3023
3024         Speculative windows build fix.
3025
3026         No new tests needed.
3027
3028         * platform/text/RegularExpression.cpp:
3029
3030 2011-02-04  Peter Varga  <pvarga@webkit.org>
3031
3032
3033         Reviewed by Gavin Barraclough.
3034
3035         Replace PCRE with Yarr in WebCore
3036         https://bugs.webkit.org/show_bug.cgi?id=53496
3037
3038         No new tests needed.
3039
3040         * Android.jscbindings.mk:
3041         * CMakeLists.txt:
3042         * ForwardingHeaders/pcre/pcre.h: Removed.
3043         * ForwardingHeaders/yarr/Yarr.h: Added.
3044         * ForwardingHeaders/yarr/YarrInterpreter.h: Added.
3045         * ForwardingHeaders/yarr/YarrPattern.h: Added.
3046         * WebCore.gyp/WebCore.gyp:
3047         * WebCore.pro:
3048         * WebCore.vcproj/WebCore.vcproj:
3049         * WebCore.vcproj/copyForwardingHeaders.cmd:
3050         * platform/text/RegularExpression.cpp:
3051         (WebCore::RegularExpression::Private::create):
3052         (WebCore::RegularExpression::Private::Private):
3053         (WebCore::RegularExpression::Private::compile):
3054         (WebCore::RegularExpression::match):
3055
3056 2011-02-04  Pavel Feldman  <pfeldman@chromium.org>
3057
3058         Reviewed by Yury Semikhatsky.
3059
3060         Web Inspector: Network panel filtering is broken.
3061         https://bugs.webkit.org/show_bug.cgi?id=53764
3062
3063         * inspector/front-end/NetworkPanel.js:
3064         (WebInspector.NetworkPanel.prototype._sortItems):
3065         (WebInspector.NetworkPanel.prototype._sortByTimeline):
3066         (WebInspector.NetworkPanel.prototype._filter):
3067         (WebInspector.NetworkPanel.prototype._updateOffscreenRows):
3068         (WebInspector.NetworkDataGridNode.prototype.isFilteredOut):
3069         (WebInspector.NetworkDataGridNode.prototype.get selectable):
3070         (WebInspector.NetworkTotalGridNode.prototype.isFilteredOut):
3071         (WebInspector.NetworkTotalGridNode.prototype.get selectable):
3072
3073 2011-02-04  Andrey Kosyakov  <caseq@chromium.org>
3074
3075         Reviewed by Pavel Feldman.
3076
3077         Web Inspector: support overriding user agent strings
3078         https://bugs.webkit.org/show_bug.cgi?id=51485
3079
3080         Test: http/tests/inspector/extensions-useragent.html
3081
3082         * inspector/Inspector.idl:
3083         * inspector/InspectorController.cpp:
3084         (WebCore::InspectorController::disconnectFrontend):
3085         (WebCore::InspectorController::setUserAgentOverride):
3086         (WebCore::InspectorController::userAgentOverride):
3087         * inspector/InspectorController.h:
3088         * inspector/front-end/ExtensionAPI.js:
3089         (WebInspector.injectedExtensionAPI.InspectedWindow.prototype.reload):
3090         * inspector/front-end/ExtensionServer.js:
3091         (WebInspector.ExtensionServer.prototype._onReload):
3092         * loader/FrameLoader.cpp:
3093         (WebCore::FrameLoader::userAgent):
3094         (WebCore::FrameLoader::applyUserAgent):
3095
3096 2011-02-04  Pavel Podivilov  <podivilov@chromium.org>
3097
3098         Reviewed by Pavel Feldman.
3099
3100         Web Inspector: scripts panel displays wrong file name after reload.
3101         https://bugs.webkit.org/show_bug.cgi?id=53761
3102
3103         * inspector/front-end/ScriptsPanel.js:
3104         (WebInspector.ScriptsPanel.prototype._resourceLoadingFinished):
3105
3106 2011-02-03  Yury Semikhatsky  <yurys@chromium.org>
3107
3108         Reviewed by Pavel Feldman.
3109
3110         Web Inspector: remove settings related methods from InspectorClient
3111         https://bugs.webkit.org/show_bug.cgi?id=53686
3112
3113         * WebCore.exp.in:
3114         * inspector/CodeGeneratorInspector.pm:
3115         * inspector/InspectorClient.h:
3116         * inspector/InspectorFrontendClientLocal.cpp:
3117         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
3118         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
3119         (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
3120         * inspector/InspectorFrontendClientLocal.h: ports that provide in-process implementation of the inspector front-end can
3121         provide platform-specific settings accessor.
3122         (WebCore::InspectorFrontendClientLocal::Settings::Settings):
3123         (WebCore::InspectorFrontendClientLocal::Settings::~Settings):
3124         (WebCore::InspectorFrontendClientLocal::Settings::inspectorAttachedHeight):
3125         (WebCore::InspectorFrontendClientLocal::Settings::storeInspectorAttachedHeight):
3126         * loader/EmptyClients.h:
3127
3128 2011-02-03  Anton Muhin  <antonm@chromium.org>
3129
3130         Reviewed by Adam Barth.
3131
3132         [v8] frame several more JS code invocations into v8::TryCatch
3133         https://bugs.webkit.org/show_bug.cgi?id=53594
3134
3135         This patch is preemptive and adjusts v8 bindings code to forthcoming small change
3136         in v8::ThrowException---currently sometimes exceptions thrown by this method
3137         do not reach surrounding v8::TryCatch handler (see
3138         http://code.google.com/p/v8/issues/detail?id=1072 and
3139         http://codereview.chromium.org/6397011/).  Therefore the goal of this patch
3140         is to make forthcoming v8 roll as smooth as possible (alas, we'll still need
3141         one rebaseline as of now.)
3142
3143         * bindings/v8/V8Proxy.cpp:
3144         (WebCore::V8Proxy::runScript): Do not rely on empty handle as a signal of exception, wrap into v8::TryCatch instead
3145         * bindings/v8/V8WindowErrorHandler.cpp:
3146         (WebCore::V8WindowErrorHandler::callListenerFunction): Ditto
3147
3148 2011-02-03  Maciej Stachowiak  <mjs@apple.com>
3149
3150         Reviewed by Dan Bernstein.
3151
3152         WebKit2: Need WebKit2 equivalent of WebResourceLoadDelegate::willSendRequest in the Bundle
3153         https://bugs.webkit.org/show_bug.cgi?id=52897
3154         <rdar://problem/8898294>
3155
3156         * WebCore.exp.in: Add export now needed by WebKit2
3157
3158 2011-02-03  Victoria Kirst  <vrk@google.com>
3159
3160         Reviewed by James Robinson.
3161
3162         Replaces float literals with uniform values in shader code
3163         so that buggy drivers unable to parse float values in different
3164         locales will not produce a pink video.
3165
3166         [chromium] Fix pink video bug with gpu-acceleration enabled
3167         https://bugs.webkit.org/show_bug.cgi?id=53568
3168
3169         * platform/graphics/chromium/VideoLayerChromium.cpp:
3170         (WebCore::VideoLayerChromium::SharedValues::SharedValues):
3171         (WebCore::VideoLayerChromium::drawYUV):
3172         * platform/graphics/chromium/VideoLayerChromium.h:
3173         (WebCore::VideoLayerChromium::SharedValues::signAdjLocation):
3174
3175 2011-02-03  James Kozianski  <koz@chromium.org>
3176
3177         Reviewed by Dimitri Glazkov.
3178
3179         Add navigator.registerProtocolHandler behind a flag.
3180         https://bugs.webkit.org/show_bug.cgi?id=52609
3181
3182         This method is described in the HTML5 specification here,
3183         http://dev.w3.org/html5/spec/Overview.html#dom-navigator-registerprotocolhandler
3184
3185         This change is largely cribbed from B. Green's 29651 patches. It is
3186         behind a flag so as not to break JS feature detection.
3187
3188         New layout test fast/dom/registerProtocolHandler.html.
3189
3190         * Configurations/FeatureDefines.xcconfig:
3191         * loader/EmptyClients.h:
3192         (WebCore::EmptyChromeClient::registerProtocolHandler):
3193         * page/Chrome.cpp:
3194         (WebCore::Chrome::registerProtocolHandler):
3195         * page/Chrome.h:
3196         * page/ChromeClient.h:
3197         * page/Navigator.cpp:
3198         (WebCore::verifyCustomHandlerURL):
3199         (WebCore::verifyProtocolHandlerScheme):
3200         (WebCore::Navigator::registerProtocolHandler):
3201         * page/Navigator.h:
3202         * page/Navigator.idl:
3203
3204 2011-02-03  Brian Ryner  <bryner@chromium.org>
3205
3206         Reviewed by Darin Fisher.
3207
3208         Add a field to the ResourceResponse for tracking the socket address
3209         of the host that the resource was fetched from.  Patch was originally
3210         by Paul Marks.
3211         https://bugs.webkit.org/show_bug.cgi?id=53699
3212
3213         * platform/network/chromium/ResourceResponse.cpp:
3214         (WebCore::ResourceResponse::doPlatformCopyData):
3215         (WebCore::ResourceResponse::doPlatformAdopt):
3216         * platform/network/chromium/ResourceResponse.h:
3217         (WebCore::ResourceResponse::socketAddress):
3218         (WebCore::ResourceResponse::setSocketAddress):
3219
3220 2011-02-03  Adam Langley  <agl@chromium.org>
3221
3222         Reviewed by Adam Barth.
3223
3224         Plumb mixed script URL to FrameLoaderClient
3225         https://bugs.webkit.org/show_bug.cgi?id=52384
3226
3227         Regressions covered by http/tests/security/mixedContent/*
3228
3229         * loader/EmptyClients.h:
3230         (WebCore::EmptyFrameLoaderClient::didRunInsecureContent):
3231         * loader/FrameLoader.cpp:
3232         (WebCore::FrameLoader::checkIfRunInsecureContent):
3233         * loader/FrameLoaderClient.h:
3234
3235 2011-02-03  Simon Fraser  <simon.fraser@apple.com>
3236
3237         Reviewed by Dan Bernstein.
3238
3239         REGRESSION: Artifacts on box-shadow corners in some cases
3240         https://bugs.webkit.org/show_bug.cgi?id=53731
3241
3242         Fix overdrawing artifacts in ShadowBlur's tiling code path,
3243         which show up in shadows using a color with alpha.
3244         
3245         Test: fast/box-shadow/shadow-tiling-artifact.html
3246
3247         * platform/graphics/ShadowBlur.cpp:
3248         (WebCore::ShadowBlur::drawRectShadowWithTiling): Ensure
3249         that the inner rect that gets filled does not overlap with any
3250         of the eight tiled areas by having the corner and side dimensions
3251         be the same for contiguous areas.
3252
3253 2011-02-03  Adam Barth  <abarth@webkit.org>
3254
3255         Reviewed by Alexey Proskuryakov.
3256
3257         XSS Auditor is spinning inside decodeURLEscapeSequences() if there are
3258         percent signs in large posted data
3259         https://bugs.webkit.org/show_bug.cgi?id=53405
3260
3261         If the input string contains many non-% characters followed by a %
3262         character that is not a valid URL escape sequence, then the old
3263         algorithm would only advance the initial search by one character
3264         (instead of jumping to just after the % character).  That would cause
3265         the algorithm to take N^2 time (in the number of characters before the
3266         first % character).  This patch just advances the search past the first
3267         % character so we can start looking for next % character sooner.
3268
3269         * platform/KURL.cpp:
3270         (WebCore::decodeURLEscapeSequences):
3271
3272 2011-02-03  Pavel Podivilov  <podivilov@chromium.org>
3273
3274         Reviewed by Pavel Feldman.
3275
3276         Web Inspector: click on a breakpoint highlights wrong line in source frame.
3277         https://bugs.webkit.org/show_bug.cgi?id=53692
3278
3279         * inspector/front-end/BreakpointsSidebarPane.js:
3280         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._setupBreakpointElement):
3281
3282 2011-02-03  Anton Muhin  <antonm@chromium.org>
3283
3284         Reviewed by Adam Barth.
3285
3286         [v8] Bail out if to string conversion returned empty handle
3287         https://bugs.webkit.org/show_bug.cgi?id=53687
3288
3289         This a temporary measure: actually one probably should never get empty handle
3290         if there was no exception.  The root cause is under investigation.
3291         The bailout though allows Chromium not to crash---attempt to convert an empty
3292         v8 hande into WebCore string crashes with invalid memory access.
3293
3294         See http://code.google.com/p/chromium/issues/detail?id=71544
3295
3296         There is no known reduction expressible as a layout test so far.  The crash found with automated testing tools.
3297
3298         * bindings/v8/V8Binding.cpp:
3299         (WebCore::v8NonStringValueToWebCoreString): Bail out on empty handle
3300         * bindings/v8/V8Binding.h:
3301         (WebCore::V8ParameterBase::prepareBase): Ditto
3302
3303 2011-02-03  Adam Barth  <abarth@webkit.org>
3304
3305         Attempt to fix Chromium build.
3306
3307         * html/parser/XSSFilter.cpp:
3308
3309 2011-02-03  Dirk Pranke  <dpranke@chromium.org>
3310
3311         Unreviewed, rolling out r77562.
3312         http://trac.webkit.org/changeset/77562
3313         https://bugs.webkit.org/show_bug.cgi?id=53630
3314
3315         broke chromium mac build
3316
3317         * WebCore.gyp/WebCore.gyp:
3318         * WebCore.gyp/mac/check_objc_rename.sh: Removed.
3319
3320 2011-02-03  Adam Barth  <abarth@webkit.org>
3321
3322         Reviewed by Daniel Bates.
3323
3324         XSS Auditor severely affects loading performance after submitting a large form
3325         https://bugs.webkit.org/show_bug.cgi?id=49845
3326
3327         Switch over from the XSSAuditor to the XSSFilter, improving performance
3328         on this example.
3329
3330         * html/parser/XSSFilter.cpp:
3331         (WebCore::XSSFilter::filterToken):
3332         * page/XSSAuditor.cpp:
3333         (WebCore::XSSAuditor::isEnabled):
3334
3335 2011-02-03  Dirk Pranke  <dpranke@chromium.org>
3336
3337         Unreviewed, rolling out r77567.
3338         http://trac.webkit.org/changeset/77567
3339         https://bugs.webkit.org/show_bug.cgi?id=53468
3340
3341         broke chromium linux svg, canvas tests, possibly win also?
3342
3343         * platform/graphics/skia/ImageBufferSkia.cpp:
3344         (WebCore::getImageData):
3345         (WebCore::ImageBuffer::getUnmultipliedImageData):
3346         (WebCore::ImageBuffer::getPremultipliedImageData):
3347         (WebCore::putImageData):
3348         (WebCore::ImageBuffer::putUnmultipliedImageData):
3349         (WebCore::ImageBuffer::putPremultipliedImageData):
3350
3351 2011-02-02  MORITA Hajime  <morrita@google.com>
3352
3353         Reviewed by Dimitri Glazkov.
3354
3355         Refactoring: <progress> should not use ShadowElement
3356         https://bugs.webkit.org/show_bug.cgi?id=53583
3357
3358         - Introduced RenderIndicatorPart and RenderProgressBarValuePart
3359           to be responsible for bar-part layout,
3360           which adopted layout logic from ShadowBlockElement.
3361         - ProgressBarValueElement is no longer a subclass of ShadowBlockElement.
3362         - Remove dependency from RenderProgress to HTMLProgressElement and
3363           ShadowBlockElement.
3364         - The shadow tree is no longer removed on detach(). It becomes persistent.
3365           This is now possible because the ShadowBlockElement dependency is gone.
3366         - ::-webkit-appearance for -webkit-progress-bar-value is no longer referred.
3367           That didn't make sense.
3368
3369         * html/HTMLProgressElement.cpp:
3370         (WebCore::HTMLProgressElement::createShadowSubtreeIfNeeded):
3371         * html/HTMLProgressElement.h:
3372         * html/shadow/ProgressBarValueElement.h: Added.
3373         (WebCore::ProgressBarValueElement::ProgressBarValueElement):
3374         (WebCore::ProgressBarValueElement::shadowPseudoId):
3375         (WebCore::ProgressBarValueElement::createRenderer):
3376         (WebCore::ProgressBarValueElement::create):
3377         * rendering/RenderIndicator.cpp:
3378         (WebCore::RenderIndicatorPart::RenderIndicatorPart):
3379         (WebCore::RenderIndicatorPart::~RenderIndicatorPart):
3380         (WebCore::RenderIndicatorPart::layout):
3381         (WebCore::RenderIndicatorPart::styleDidChange):
3382         * rendering/RenderIndicator.h: Added RenderIndicatorPart class
3383         (WebCore::RenderIndicatorPart::originalVisibility):
3384         (WebCore::RenderIndicatorPart::requiresForcedStyleRecalcPropagation):
3385         (WebCore::RenderIndicatorPart::canHaveChildren):
3386         * rendering/RenderProgress.cpp:
3387         (WebCore::RenderProgressBarValuePart::preferredFrameRect):
3388         (WebCore::RenderProgressBarValuePart::shouldBeHidden):
3389         (WebCore::RenderProgress::updateFromElement):
3390         (WebCore::RenderProgress::layoutParts):
3391         (WebCore::RenderProgress::shouldHaveParts):
3392         * rendering/RenderProgress.h:
3393         (WebCore::RenderProgressBarValuePart::RenderProgressBarValuePart):
3394
3395 2011-02-03  Jia Pu  <jpu@apple.com>
3396
3397         Reversion should not be marked as misspelled.
3398         https://bugs.webkit.org/show_bug.cgi?id=53255
3399
3400         This patch includes fix for reported bug, and also some housekeeping changes.
3401
3402         To implement desired behavior, we need:
3403         1. Add a new marker type, SpellCheckingExemption, since now we distingusish between text
3404            that shouldn't be spellchecked and text shouldn't be autocorrected.
3405         2. Make sure that there is no pending correction panel when we enter markAllMisspellingsAndBadGrammarInRanges().
3406            Otherwise the spell checking code in that function may interfere with autocorrection. This
3407            is achieved by explicitly applying pending correction when user types space, line break or
3408            paragraph break.
3409
3410         Housekeeping code changes include:
3411         1. Change manual-tests that were broken by relocated WebCore directory.
3412         2. Use TextIterator in various DocumentMarkerController functions instead of using
3413            Node::traverseNextNode() directly.
3414         3. Allow passing multiple marker types into DocumentMarkerController::removeMarkers() and
3415            DocumentMarkerController::hasMarkers() to improve clarity and efficiency.
3416         4. Fixes of minor bugs that were exposed previously.
3417
3418         * WebCore.exp.in: Change signature of DocumentMarkerController::removeMarkers().
3419
3420         * dom/DocumentMarker.h: Added new marker type SpellCheckingExemption.
3421
3422         * dom/DocumentMarkerController.cpp:
3423         (WebCore::DocumentMarkerController::removeMarkers): Use TextIterator to scan the range to be
3424            consistent with addMarker() function. Allow passing in multiple marker types in one call.
3425            Added a boolean argument to specify the behavior when removing markers that partially
3426            overlap the specified range.
3427         (WebCore::DocumentMarkerController::removeMarkersFromMarkerMapVectorPair): Allow passing in
3428            multiple marker types in one call.
3429         (WebCore::DocumentMarkerController::hasMarkers): Use TextIterator to scan the range to be
3430            consistent with addMarker() function. Allow passing in multiple marker types in one call.
3431
3432         * dom/DocumentMarkerController.h: Allow passing in multiple marker types to removeMarkers()
3433            and hasMarkers(). Added a boolean argument to removeMarkers() to specify the behavior when
3434            removing markers that partially overlap the specified range.
3435
3436         * editing/Editor.cpp:
3437         (WebCore::markerTypesForAutocorrection): Add SpellCheckingExemption marker when apply correction.
3438         (WebCore::markerTypesForReplacement): Ditto.
3439         (WebCore::Editor::respondToChangedSelection): Reordered call to dismissCorrectionPanel() and
3440            setSelection() to make sure there is no pending correction when entering
3441            markAllMisspellingsAndBadGrammarInRanges().
3442         (WebCore::Editor::appliedEditing): Only remove CorrectionIndicator markers when the command
3443            is a top level command to improve efficiency.
3444         (WebCore::Editor::insertTextWithoutSendingTextEvent): Added code to applying pending correction.
3445         (WebCore::Editor::insertLineBreak): Ditto.
3446         (WebCore::Editor::insertParagraphSeparator): Ditto.
3447         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Don't mark mispelling if the
3448            text carries SpellCheckingExemption marker.
3449         (WebCore::Editor::correctionPanelTimerFired): Reset correction panel if the returned suggestion
3450            from spellchecker is an empty string.
3451         (WebCore::Editor::removeSpellAndCorrectionMarkersFromWordsToBeEdited):
3452            Use new DocumentMarkerController::removeMarkers() to replace custom implemenation to improve
3453            efficiency and readability.
3454         (WebCore::Editor::applyCorrectionPanelInfo): Remove the code that set caret position after
3455            applying correction, since it's unnecessary. Also, store pre-correction string together with
3456            the marker for reversion panel to use.
3457         (WebCore::Editor::applyAutocorrectionBeforeTypingIfAppropriate): Apply pending correction.
3458         (WebCore::Editor::changeSelectionAfterCommand): Moved marker removal code to Editor::appliedEditing()
3459            where we have access to EditCommand object.
3460
3461         * editing/Editor.h: Added new function applyAutocorrectionAfterTypingIfAppropriate().
3462
3463         * manual-tests/autocorrection/autocorrection-cancelled-by-ESC.html: Change manual-tests that
3464            were broken by relocated WebCore directory.
3465
3466         * manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html: Ditto.
3467
3468         * manual-tests/autocorrection/autocorrection-contraction.html: Ditto.
3469
3470         * manual-tests/autocorrection/continue-typing-to-dismiss-reversion.html: Ditto.
3471
3472         * manual-tests/autocorrection/delete-to-dismiss-reversion.html: Ditto.
3473
3474         * manual-tests/autocorrection/delete-to-end-of-word-to-show-reversion.html: Ditto.
3475
3476         * manual-tests/autocorrection/dismiss-multiple-guesses.html: Ditto.
3477
3478         * manual-tests/autocorrection/move-to-end-of-word-to-show-reversion.html: Ditto.
3479
3480         * manual-tests/autocorrection/select-from-multiple-guesses.html: Ditto.
3481
3482         * manual-tests/autocorrection/spell-checking-after-reversion.html: Added.
3483
3484         * manual-tests/autocorrection/type-whitespace-to-dismiss-reversion.html: Change manual-tests that
3485            were broken by relocated WebCore directory.
3486
3487         * rendering/InlineTextBox.cpp:
3488         (WebCore::InlineTextBox::paintDocumentMarkers): Code clean-up to be more concise.
3489
3490 2011-02-03  Abhishek Arya  <inferno@chromium.org>
3491
3492         Unreviewed, qt build fix.
3493
3494         * rendering/RenderBlock.cpp:
3495         (WebCore::RenderBlock::removeFloatingObject):
3496
3497 2011-02-03  Brian Salomon  <bsalomon@google.com>
3498
3499         Reviewed by James Robinson.
3500
3501         Handle non-raster backed images in getUnmultipliedImageData()
3502         https://bugs.webkit.org/show_bug.cgi?id=53468
3503
3504         No new tests. Existing canvas tests sufficient
3505         LayoutTests/canvas/philip/...
3506
3507         * platform/graphics/skia/ImageBufferSkia.cpp:
3508         (WebCore::getImageData):
3509         (WebCore::ImageBuffer::getUnmultipliedImageData):
3510         (WebCore::ImageBuffer::getPremultipliedImageData):
3511         (WebCore::putImageData):
3512         (WebCore::ImageBuffer::putUnmultipliedImageData):
3513         (WebCore::ImageBuffer::putPremultipliedImageData):
3514
3515 2011-02-03  Abhishek Arya  <inferno@chromium.org>
3516
3517         Reviewed by James Robinson.
3518
3519         Enforce more limits on root inline boxes height calculations.
3520         https://bugs.webkit.org/show_bug.cgi?id=53729
3521
3522         Test: fast/overflow/overflow-height-float-not-removed-crash.html