72897a9d3c06545633bae9bce7bd946ebeca8ee7
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-09-29  Fady Samuel  <fsamuel@chromium.org>
2
3         Fixed Hit testing on Framesets when Frameset is transformed
4         https://bugs.webkit.org/show_bug.cgi?id=67740
5
6         Reviewed by Simon Fraser.
7
8         Tests: fast/frames/frame-set-rotation-hit.html
9                fast/frames/frame-set-scaling-hit.html
10
11         * rendering/RenderFrameSet.cpp:
12         (WebCore::RenderFrameSet::userResize):
13
14 2011-09-29  Dirk Pranke  <dpranke@chromium.org>
15
16         fix gyp warnings in chromium for renamed files
17         https://bugs.webkit.org/show_bug.cgi?id=69116
18
19         Reviewed by Adam Barth.
20
21         * WebCore.gypi:
22
23 2011-09-29  Martin Robinson  <mrobinson@igalia.com>
24
25         [Freetype] Some text in Planet GNOME renders in the wrong place
26         https://bugs.webkit.org/show_bug.cgi?id=69099
27
28         Reviewed by Dirk Schulze.
29
30         Test: platform/gtk/fonts/synthetic-oblique-positioning.html
31
32         Fold the oblique transform into the font matrix itself rather than transforming
33         the CTM of the context at render time. Not only does this fix the issue, it
34         prevents unnecessary work on every paint.
35
36         * platform/graphics/cairo/FontCairo.cpp:
37         No longer set the synthetic oblique transformation matrix on the context
38         when rendering the text. Instead it is now folded into the TM of the font
39         itself.
40         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
41         (WebCore::FontPlatformData::initializeWithFontFace): Fold the oblique transform into the scaled font.
42         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
43         (WebCore::FontPlatformData::FontPlatformData): Ditto.
44
45 2011-09-29  Dan Bernstein  <mitz@apple.com>
46
47         Follow-up fix for <rdar://problem/10191243> Glyph variants (line final swashes) appear where they should not
48
49         Reviewed by Simon Fraser.
50
51         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
52         (WebCore::FontPlatformData::ctFont): Check for Hoefler Text Black Italic as well.
53
54 2011-09-29  Cary Clark  <caryclark@google.com>
55
56         Enable LCD text in Skia on Mac
57         https://bugs.webkit.org/show_bug.cgi?id=68734
58
59         Reviewed by Stephen White.
60
61         No new tests. Existing layout tests are generated
62         with LCD text disabled for pixel comparisons.
63
64         Duplicate the logic in FontMac.mm to pass settings
65         for antialiasing and smoothing. Also disable smoothing
66         for DumpRenderTree.
67  
68         * platform/graphics/skia/FontSkia.cpp:
69         (WebCore::setupPaint):
70         (WebCore::Font::drawGlyphs):
71
72 2011-09-29  Varun Jain  <varunjain@google.com>
73  
74          Implement flick gesture in Chromium Gesture Recognizer
75          https://bugs.webkit.org/show_bug.cgi?id=67930
76  
77          Reviewed by Dimitri Glazkov.
78  
79          Test: Source/WebKit/chromium/tests/InnerGestureRecognizerTest.cpp 
80  
81          * platform/chromium/GestureRecognizerChromium.cpp:
82          (WebCore::GestureRecognizerChromium::isOverMinFlickSpeed):
83          (WebCore::GestureRecognizerChromium::appendScrollGestureEnd):
84          (WebCore::GestureRecognizerChromium::updateValues):
85          (WebCore::GestureRecognizerChromium::scrollEnd):
86          * platform/chromium/GestureRecognizerChromium.h:
87
88 2011-09-29  Noel Gordon  <noel.gordon@gmail.com>
89
90         [chromium] canvas.toDataURL("image/jpeg"): use libjpeg-turbo data swizzle
91         https://bugs.webkit.org/show_bug.cgi?id=67402
92
93         Reviewed by Kenneth Russell.
94
95         libjpeg-turbo can read directly from the input data for the premultiplied BRGX
96         (SkBitmap) encoding case.
97
98         No change in behavior, covered by existing canvas 2d/3d tests
99         canvas/philip/tests/toDataURL.jpeg.alpha.html
100         fast/canvas/webgl/premultiplyalpha-test.html
101
102         * platform/image-encoders/skia/JPEGImageEncoder.cpp:
103         (WebCore::encodePixels): If JCS_EXTENSIONS is defined (libjpeg-turbo), swizzle
104         the input BRGX pixels directly within libjpeg-turbo.
105
106 2011-09-29  Adam Barth  <abarth@webkit.org>
107
108         Fixenate the build.
109
110         * bindings/v8/V8DOMWindowShell.cpp:
111         (WebCore::V8DOMWindowShell::namedItemAdded):
112
113 2011-09-29  Ryosuke Niwa  <rniwa@webkit.org>
114
115         Remove direct reads to m_firstNodeInserted and m_lastLeafInserted in ReplaceSelectionCommand
116         https://bugs.webkit.org/show_bug.cgi?id=69023
117
118         Reviewed by Enrica Casucci.
119
120         Converted to removeUnrenderedTextNodesAtEnds to use InsertedNodes instead of m_firstNodeInserted
121         and m_lastLeafInserted. Extracted the logic to update nodes as InsertedNodes::willRemoveNode
122         (old one was renamed to InsertedNodes::willRemoveNodePreservingChildren).
123
124         Also extracted shouldPerformSmartReplace and addSpacesForSmartReplace out of doApply,
125         and rewrote the logic to obtain endNode and startNode using startOfInsertedContent and
126         endOfInsertedContent instead of m_firstNodeInserted and m_lastLeafInserted.
127
128         Finally, replaced the nullity checks of m_firstNodeInserted and m_lastLeafInserted in
129         completeHTMLReplacement by nullity checks of start and end positions.
130
131         * dom/Node.cpp:
132         (WebCore::Node::traversePreviousSibling): Added.
133         * dom/Node.h:
134         * editing/ReplaceSelectionCommand.cpp:
135         (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren): Renamed from
136         willRemoveNode.
137         (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNode): Extracted from
138         removeUnrenderedTextNodesAtEnds.
139         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
140         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
141         (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent): Made const.
142         (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent): Made const.
143         (WebCore::ReplaceSelectionCommand::handleStyleSpans): Takes firstNodeInserted instead of directly
144         accessing m_firstNodeInserted.
145         (WebCore::ReplaceSelectionCommand::doApply):
146         (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
147         (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
148         (WebCore::ReplaceSelectionCommand::completeHTMLReplacement):
149         * editing/ReplaceSelectionCommand.h:
150
151 2011-09-29  Andreas Kling  <kling@webkit.org>
152
153         Shrink HTMLAnchorElement on 32-bit.
154         https://bugs.webkit.org/show_bug.cgi?id=69094
155
156         Reviewed by Antti Koivisto.
157
158         * html/HTMLAnchorElement.h: Pack members into a bitfield.
159
160 2011-09-29  Dan Bernstein  <mitz@apple.com>
161
162         <rdar://problem/10191243> Glyph variants (line final swashes) appear where they should not
163
164         Reviewed by Simon Fraser.
165
166         Test: fast/text/line-initial-and-final-swashes.html
167
168         Hoefler Text Italic enables line-initial and -final swashes by default, so disable them. This
169         change targets only this known-bad font rather than all fonts, because at least one font (Khmer MN)
170         incorrectly claims to have the line-initial feature enabled, but disabling it actually does
171         something different and bad (breaking some combining marks).
172
173         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
174         (WebCore::createFeatureSettingDictionary): Added this helper function.
175         (WebCore::cascadeToLastResortFontDescriptor): Deployed WTF_ARRAY_LENGTH().
176         (WebCore::cascadeToLastResortAndDisableSwashesFontDescriptor): Added. Returns a font descriptor
177         that, in addition to having a cascade list consisting of the last resort font, also has feature
178         settings to disable line-initial and line-final swashes.
179         (WebCore::FontPlatformData::ctFont): For Hoefler Text Italic, use cascadeToLastResortAndDisableSwashesFontDescriptor().
180
181 2011-09-29  Mark Hahnenberg  <mhahnenberg@apple.com>
182
183         Unreviewed: resetting baseline for code generator bindings
184
185         Unreviewed build fix
186
187         No new tests.
188
189         * bindings/scripts/test/JS/JSTestObj.cpp:
190         * bindings/scripts/test/JS/JSTestObj.h:
191
192 2011-09-29  Nate Chapin  <japhet@chromium.org>
193
194         [V8, chromium] More logging to determine cause of a null
195         v8::Context in V8DOMWindowShell::namedItemAdded().
196
197         https://bugs.webkit.org/show_bug.cgi?id=68099
198
199         Reviewed by Adam Barth.
200
201         * bindings/v8/V8DOMWindowShell.cpp:
202         (WebCore::V8DOMWindowShell::namedItemAdded):
203
204 2011-09-29  Alexey Proskuryakov  <ap@apple.com>
205
206         https://bugs.webkit.org/show_bug.cgi?id=69040
207         ScrollbarThemeComposite requires a ScrollView to draw scroll corner
208
209         Reviewed by Simon Fraser.
210
211         No new tests. This will be needed later.
212
213         * platform/ScrollbarThemeComposite.cpp:
214         (WebCore::pageForScrollView):
215         (WebCore::ScrollbarThemeComposite::paintScrollCorner):
216         Use pageForScrollView() function which already existed in this file, used in another similar
217         location.
218
219         * platform/chromium/FramelessScrollView.cpp:
220         * platform/chromium/FramelessScrollView.h:
221         * platform/gtk/ScrollbarThemeGtk.cpp:
222         * platform/gtk/ScrollbarThemeGtk.h:
223         * platform/wx/ScrollbarThemeWx.cpp:
224         * platform/wx/ScrollbarThemeWx.h:
225         All these overrides are no longer needed, ScrollbarThemeComposite will do the right thing.
226
227         * platform/qt/ScrollbarThemeQt.cpp: (WebCore::ScrollbarThemeQt::paintScrollCorner):
228         Removed a special case for updatingControlTints phase. The same case is present in cross-platform
229         code now, and Qt doesn't have any custom subclasses of ScrollableArea or ScrollView to need
230         special handling.
231         This was added in r37377 without a bug or much ChangeLog explanation.
232
233 2011-09-29  Mark Hahnenberg  <mhahnenberg@apple.com>
234
235         De-virtualize JSCell::visitChildrenVirtual and remove all other visitChildrenVirtual methods
236         https://bugs.webkit.org/show_bug.cgi?id=68839
237
238         Reviewed by Geoffrey Garen.
239
240         No new tests.
241
242         Removed the remaining visitChildrenVirtual methods.  This patch completes the process of 
243         de-virtualizing visitChildren.
244
245         * WebCore.exp.in:
246         * bindings/js/JSAttrCustom.cpp:
247         * bindings/js/JSAudioContextCustom.cpp:
248         * bindings/js/JSCSSRuleCustom.cpp:
249         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
250         * bindings/js/JSCanvasRenderingContextCustom.cpp:
251         * bindings/js/JSDOMGlobalObject.cpp:
252         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
253         (WebCore::JSDOMGlobalObject::finishCreation):
254         * bindings/js/JSDOMGlobalObject.h:
255         * bindings/js/JSDOMWindowCustom.cpp:
256         * bindings/js/JSDOMWindowShell.cpp:
257         * bindings/js/JSDOMWindowShell.h:
258         * bindings/js/JSJavaScriptAudioNodeCustom.cpp:
259         * bindings/js/JSMessageChannelCustom.cpp:
260         * bindings/js/JSMessagePortCustom.cpp:
261         * bindings/js/JSNamedNodeMapCustom.cpp:
262         * bindings/js/JSNodeCustom.cpp:
263         * bindings/js/JSNodeFilterCustom.cpp:
264         * bindings/js/JSNodeIteratorCustom.cpp:
265         * bindings/js/JSSVGElementInstanceCustom.cpp:
266         * bindings/js/JSSharedWorkerCustom.cpp:
267         * bindings/js/JSStyleSheetCustom.cpp:
268         * bindings/js/JSTreeWalkerCustom.cpp:
269         * bindings/js/JSWebGLRenderingContextCustom.cpp:
270         * bindings/js/JSWorkerContextCustom.cpp:
271         * bindings/js/JSXMLHttpRequestCustom.cpp:
272         * bindings/js/JSXPathResultCustom.cpp:
273         * bindings/scripts/CodeGeneratorJS.pm:
274         (GenerateHeader):
275         (GenerateImplementation):
276         * bridge/qt/qt_instance.cpp:
277         * bridge/qt/qt_runtime.cpp:
278         * bridge/qt/qt_runtime.h:
279
280 2011-09-23  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
281
282         [Qt] Fix build against Qt5 after refactor of widgets out of QtGUi
283
284         QWidget and friends now live in the QtWidgets library. We update
285         includes in implementation files and private headers to us the
286         non-module-prefixed path, and leave the lookup for the include
287         path. For public headers we have to ifdef the includes as the
288         user might now have the modules we need in his QT config.
289
290         Finally, QSGCanvas is no longer a QWidget but a QWindow, so we
291         have to update our code and use windowHandle() for setting the
292         parent relationships.
293
294         https://bugs.webkit.org/show_bug.cgi?id=68687
295
296         Reviewed by Andreas Kling.
297
298         * WebCore.pri:
299         * platform/graphics/qt/GraphicsLayerQt.cpp:
300
301 2011-09-29  Sheriff Bot  <webkit.review.bot@gmail.com>
302
303         Unreviewed, rolling out r96340.
304         http://trac.webkit.org/changeset/96340
305         https://bugs.webkit.org/show_bug.cgi?id=69098
306
307         Caused 10 tests to crash in Debug (Requested by
308         abarth|gardener on #webkit).
309
310         * accessibility/AXObjectCache.cpp:
311         (WebCore::AXObjectCache::AXObjectCache):
312         (WebCore::AXObjectCache::~AXObjectCache):
313         (WebCore::AXObjectCache::remove):
314         (WebCore::AXObjectCache::childrenChanged):
315         * accessibility/AXObjectCache.h:
316         * accessibility/AccessibilityMenuList.cpp:
317         (WebCore::AccessibilityMenuList::childrenChanged):
318         * accessibility/AccessibilityMenuList.h:
319         * accessibility/AccessibilityMenuListPopup.cpp:
320         (WebCore::AccessibilityMenuListPopup::childrenChanged):
321         * accessibility/AccessibilityMenuListPopup.h:
322         * accessibility/AccessibilityObject.h:
323         (WebCore::AccessibilityObject::childrenChanged):
324         * accessibility/AccessibilityRenderObject.cpp:
325         (WebCore::startOfContinuations):
326         (WebCore::AccessibilityRenderObject::updateAccessibilityRole):
327         (WebCore::AccessibilityRenderObject::childrenChanged):
328         * accessibility/AccessibilityRenderObject.h:
329         * rendering/RenderObject.cpp:
330         (WebCore::RenderObject::willBeDestroyed):
331
332 2011-09-29  Andreas Kling  <kling@webkit.org>
333
334         Shrink FontFallbackList.
335         https://bugs.webkit.org/show_bug.cgi?id=69093
336
337         Reviewed by Antti Koivisto.
338
339         Reduce the size of FontFallbackList by one CPU word, decreasing memory
340         consumption by 300 kB (on 64-bit) when loading the full HTML5 spec.
341
342         * platform/graphics/FontCache.h:
343         * platform/graphics/FontCache.cpp:
344         (WebCore::FontCache::generation):
345
346             Store the FontCache generation as an ushort rather than uint.
347
348         * platform/graphics/FontFallbackList.cpp:
349         (WebCore::FontFallbackList::FontFallbackList):
350         * platform/graphics/FontFallbackList.h:
351
352             Pack enum and bool members in a bitfield.
353
354 2011-09-29  Adam Barth  <abarth@webkit.org>
355
356         We should ignore the return value of GetRealNamedProperty
357         https://bugs.webkit.org/show_bug.cgi?id=68840
358
359         Reviewed by Nate Chapin.
360
361         Instead of skipping the lookup process by using the result of real
362         named property, we should just indiciate that it wasn't handled by the
363         interceptor.
364
365         Test: http/tests/security/window-named-valueOf.html
366
367         * bindings/v8/custom/V8DOMWindowCustom.cpp:
368         (WebCore::V8DOMWindow::namedPropertyGetter):
369
370 2011-09-29  Chris Fleizach  <cfleizach@apple.com>
371
372         ARIA live regions don't trigger notifications for elements that aren't in the AX tree
373         https://bugs.webkit.org/show_bug.cgi?id=62289
374
375         If an ARIA Live region udpates an element that is not in the AX object cache, then the Live region
376         notification is not sent. To fix this, the childrenChanged() method needs to actually create
377         the appropriate objects, but since that method gets called during a render tree update, we've learned 
378         that it's generally not safe to create objects.
379
380         Instead a one shot timer can be fired that will update and create the necessary objects so that the
381         correct notification can be sent.
382
383         Reviewed by Darin Adler.
384
385         Test: platform/mac/accessibility/aria-liveregion-without-element-access.html
386
387         * accessibility/AXObjectCache.cpp:
388         (WebCore::AXObjectCache::AXObjectCache):
389         (WebCore::AXObjectCache::~AXObjectCache):
390         (WebCore::AXObjectCache::remove):
391         (WebCore::AXObjectCache::childrenUpdateTimerFired):
392         (WebCore::AXObjectCache::childrenChanged):
393         * accessibility/AXObjectCache.h:
394         * accessibility/AccessibilityMenuList.cpp:
395         (WebCore::AccessibilityMenuList::childrenChanged):
396         * accessibility/AccessibilityMenuList.h:
397         * accessibility/AccessibilityMenuListPopup.cpp:
398         (WebCore::AccessibilityMenuListPopup::childrenChanged):
399         * accessibility/AccessibilityMenuListPopup.h:
400         * accessibility/AccessibilityObject.h:
401         (WebCore::AccessibilityObject::childrenChanged):
402         * accessibility/AccessibilityRenderObject.cpp:
403         (WebCore::startOfContinuations):
404         (WebCore::AccessibilityRenderObject::updateAccessibilityRole):
405         (WebCore::AccessibilityRenderObject::childrenChanged):
406         * accessibility/AccessibilityRenderObject.h:
407         * rendering/RenderObject.cpp:
408         (WebCore::RenderObject::willBeDestroyed):
409
410 2011-09-29  Martin Robinson  <mrobinson@igalia.com>
411
412         [GTK] Dragging a selection does not produce a drag image
413         https://bugs.webkit.org/show_bug.cgi?id=69064
414
415         Reviewed by Andreas Kling.
416
417         Moved Chromium's generic implementation of Frame::nodeImage and
418         Frame::dragImageForSeletion to Frame.cpp and simply excluded via
419         #ifdefs platforms that do not have their own implementation. Removed
420         all empty implementations of these functions and Qt's which was
421         functionally identical.
422
423         No new tests. Drag-and-drop drag image functionality changes
424         are incredibly difficult to test in a non-manual way.
425
426         * CMakeListsEfl.txt: Delist FrameEfl.cpp.
427         * GNUmakefile.list.am: Delist FrameGtk.cpp.
428         * WebCore.gypi: Delist removed Frame*.cpp.
429         * WebCore.pro: Delist FrameQt.cpp.
430         * page/Frame.cpp: Moved FrameChromium implementation here.
431         (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
432         (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
433         (WebCore::Frame::nodeImage):
434         (WebCore::Frame::dragImageForSelection):
435         * page/chromium/FrameChromium.cpp: Removed.
436         * page/efl/FrameEfl.cpp: Removed.
437         * page/gtk/FrameGtk.cpp: Removed.
438         * page/qt/FrameQt.cpp: Removed.
439         * page/wx/FrameWx.cpp: Removed.
440         * platform/gtk/ClipboardGtk.cpp:
441         (WebCore::ClipboardGtk::createDragImage): Call nodeImage to get
442         the drag image for a node.
443
444 2011-09-29  Noel Gordon  <noel.gordon@gmail.com>
445
446         [chromium skia] PNGImageEncoder: hoist constants out of the encoding loop
447         https://bugs.webkit.org/show_bug.cgi?id=68988
448
449         Reviewed by Kenneth Russell.
450
451         No new tests.  Covered by existing canvas 2d and 3d tests.
452         canvas/philip/tests/toDataURL.png.*.html
453         fast/canvas/toDataURL-alpha.html
454         fast/canvas/webgl/premultiplyalpha-test.html
455
456         * platform/image-encoders/skia/PNGImageEncoder.cpp:
457         (WebCore::encodePixels):  Move constant out of the encoding loop.
458         (WebCore::PNGImageEncoder::encode):  Consistency & style: call encodePixels()
459         just like we do in the JPEG encoder.
460
461 2011-09-29  Iain Merrick  <husky@google.com>
462
463         Add unit test for CCLayerSorter
464         https://bugs.webkit.org/show_bug.cgi?id=68622
465
466         Minor refactoring for testability:
467         - Made pointInTriangle public.
468         - Added LayerShape to decouple LayerIntersector and GraphNode.
469         - Added a public wrapper function for LayerIntersector.
470
471         Reviewed by James Robinson.
472
473         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
474         (WebCore::CCLayerSorter::pointInTriangle):
475         (WebCore::CCLayerSorter::calculateZDiff):
476         (WebCore::CCLayerSorter::LayerIntersector::LayerIntersector):
477         (WebCore::CCLayerSorter::LayerIntersector::go):
478         (WebCore::CCLayerSorter::LayerIntersector::checkZDiff):
479         (WebCore::CCLayerSorter::LayerIntersector::layerZFromProjectedPoint):
480         (WebCore::CCLayerSorter::checkOverlap):
481         (WebCore::CCLayerSorter::LayerShape::LayerShape):
482         (WebCore::CCLayerSorter::createGraphNodes):
483         * platform/graphics/chromium/cc/CCLayerSorter.h:
484         (WebCore::CCLayerSorter::LayerShape::LayerShape):
485         (WebCore::CCLayerSorter::GraphNode::GraphNode):
486
487 2011-09-29  Ilya Tikhonovsky  <loislo@chromium.org>
488
489         Web Inspector: UI performance test for network panel is incorrect. The time is including a timeout between scheduled refresh and actual refresh.
490         https://bugs.webkit.org/show_bug.cgi?id=69087
491
492         The fix has the changes for the test and minor perf framework improvements.
493
494         Reviewed by Yury Semikhatsky.
495
496         * inspector/front-end/NetworkPanel.js:
497         (WebInspector.NetworkLogView.prototype._defaultRefreshDelay.500._scheduleRefresh):
498
499 2011-09-29  Vsevolod Vlasov  <vsevik@chromium.org>
500
501         Web Inspector: Make search-in-resource test simpler.
502         https://bugs.webkit.org/show_bug.cgi?id=69025
503
504         Changed search-in-resource test.
505         Removed error parameter from content provider's searchInContent callback.
506
507         Reviewed by Pavel Feldman.
508
509         * inspector/InspectorPageAgent.cpp:
510         (WebCore::InspectorPageAgent::searchInResource):
511         (WebCore::InspectorPageAgent::searchInResources):
512         * inspector/front-end/Resource.js:
513         (WebInspector.Resource.prototype.searchInContent):
514
515 2011-09-29  Hans Wennborg  <hans@chromium.org>
516
517         IndexedDB: Use LevelDB also for in-memory databases
518         https://bugs.webkit.org/show_bug.cgi?id=68903
519
520         Reviewed by Steve Block.
521
522         Add LevelDBDatabase::openInMemory() which uses leveldb::NewMemEnv()
523         to create in-memory LevelDB databases.
524
525         Use this in IDBLeveLDBBackingStore::open() when the caller passes in
526         an empty file path.
527         This happens in Chromium's incognito mode, and when running layout
528         tests.
529
530         Fix IDBSQLiteBackingStore::backingStoreExists() so it doesn't create
531         files when passed in an empty file path, but uses the in-memory mode
532         instead.
533
534         Existing layout tests will all be run in-memory.
535
536         * platform/leveldb/LevelDBDatabase.cpp:
537         (WebCore::LevelDBDatabase::~LevelDBDatabase):
538         (WebCore::openDB):
539         (WebCore::LevelDBDatabase::open):
540         (WebCore::LevelDBDatabase::openInMemory):
541         * platform/leveldb/LevelDBDatabase.h:
542         * storage/IDBLevelDBBackingStore.cpp:
543         (WebCore::IDBLevelDBBackingStore::open):
544         * storage/IDBSQLiteBackingStore.cpp:
545         (WebCore::IDBSQLiteBackingStore::backingStoreExists):
546
547 2011-09-29  Ilya Tikhonovsky  <loislo@chromium.org>
548
549         Web Inspector: speed-up Network panel. Change _staleResources type from array to object.
550         https://bugs.webkit.org/show_bug.cgi?id=69081
551
552         There is a test with 30 requests.
553         For the each stage of loading a resource we have an entry in _staleResources array. There are at least 4 stages per request.
554         NetworkLogView._refresh function is creating/updating the resource row for the each such entry.
555         This array can be replaced with a hash map just because the resource associated with the entry is the same for all the entries with the same request id.
556
557         Reviewed by Pavel Feldman.
558
559         Test: inspector/performance/resources/network-append-30-requests.html
560
561         * inspector/front-end/NetworkPanel.js:
562         (WebInspector.NetworkLogView):
563         (WebInspector.NetworkLogView.prototype._invalidateAllItems):
564         (WebInspector.NetworkLogView.prototype.refresh):
565         (WebInspector.NetworkLogView.prototype._reset):
566         (WebInspector.NetworkLogView.prototype._refreshResource):
567
568 2011-09-28  Pavel Feldman  <pfeldman@google.com>
569
570         Web Inspector: make inspector protocol validation a part of the build process.
571         https://bugs.webkit.org/show_bug.cgi?id=68999
572
573         Since we'd like to commit to inspector protocol backwards compatibility, violating it
574         should be a build failure.
575
576         Reviewed by Yury Semikhatsky.
577
578         * CMakeLists.txt:
579         * CodeGenerators.pri:
580         * DerivedSources.make:
581         * GNUmakefile.am:
582         * WebCore.gyp/WebCore.gyp:
583         * inspector/Inspector.draft-01.json:
584         * inspector/Inspector.json:
585         * inspector/generate-inspector-idl:
586         * inspector/generate-protocol-externs:
587         * inspector/validate-protocol-compatibility:
588
589 2011-09-27  Pavel Feldman  <pfeldman@google.com>
590
591         Web Inspector: Scripts panel without folders causes errors when creating content scripts section.
592         https://bugs.webkit.org/show_bug.cgi?id=68827
593
594         Reviewed by Yury Semikhatsky.
595
596         * inspector/front-end/ScriptsPanel.js:
597         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.insertOrdered.optionCompare):
598         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.insertOrdered):
599         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect):
600
601 2011-09-28  Andrey Kosyakov  <caseq@chromium.org>
602
603         Web Inspector: network log view refresh optimizations
604         https://bugs.webkit.org/show_bug.cgi?id=69010
605
606         Reviewed by Pavel Feldman.
607
608         * inspector/front-end/NetworkPanel.js:
609         (WebInspector.NetworkLogView.prototype.refresh):
610
611 2011-09-29  Pavel Podivilov  <podivilov@chromium.org>
612
613         Web Inspector: split SourceFile.js into RawSourceCode.js and UISourceCodeContentProviders.js.
614         https://bugs.webkit.org/show_bug.cgi?id=69068
615
616         Reviewed by Yury Semikhatsky.
617
618         * WebCore.gypi:
619         * WebCore.vcproj/WebCore.vcproj:
620         * inspector/front-end/RawSourceCode.js: Renamed from Source/WebCore/inspector/front-end/SourceFile.js.
621         (WebInspector.RawSourceCode): Moved from SourceFile.js.
622         (WebInspector.UILocation): Moved from SourceFile.js.
623         * inspector/front-end/UISourceCodeContentProviders.js: Added. Moved ContentProvider implementations from SourceFile.js
624         (WebInspector.ScriptContentProvider):
625         (WebInspector.ScriptContentProvider.prototype.requestContent):
626         (WebInspector.ConcatenatedScriptsContentProvider):
627         (WebInspector.ConcatenatedScriptsContentProvider.prototype.requestContent):
628         (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent.appendChunk):
629         (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent):
630         (WebInspector.ResourceContentProvider):
631         (WebInspector.ResourceContentProvider.prototype.requestContent):
632         (WebInspector.StaticContentProvider):
633         (WebInspector.StaticContentProvider.prototype.requestContent):
634         * inspector/front-end/WebKit.qrc:
635         * inspector/front-end/inspector.html:
636
637 2011-09-29  Philippe Normand  <pnormand@igalia.com>
638
639         [GStreamer] 2 flaky media tests
640         https://bugs.webkit.org/show_bug.cgi?id=67407
641
642         Reviewed by Martin Robinson.
643
644         Workaround for GStreamer bug#639941. In GStreamer
645         0.10.35 basesink reports wrong duration in case of EOS and
646         negative playback rate. This workaround fixes two media tests,
647         media/video-timeupdate-reverse-play.html and
648         media/video-reverse-play-duration.html.
649
650         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
651         (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
652         (WebCore::MediaPlayerPrivateGStreamer::currentTime):
653         (WebCore::MediaPlayerPrivateGStreamer::didEnd):
654
655 2011-09-29  Philippe Normand  <pnormand@igalia.com>
656
657         [GStreamer] fullscreen video pause/play fails
658         https://bugs.webkit.org/show_bug.cgi?id=66936
659
660         Reviewed by Martin Robinson.
661
662         Don't use the identity element to avoid painting of the in-window
663         video. Instead simply make the sink aware of the fullscreen state
664         and ignore buffers if fullscreen and autovideosink are
665         active. Also fixed two deadlocks happening when a paused pipeline
666         is switched to fullscreen and when fullscreen is disabled for a
667         paused pipeline.
668
669         * platform/graphics/gstreamer/GStreamerGWorld.cpp:
670         (WebCore::GStreamerGWorld::enterFullscreen):
671         (WebCore::GStreamerGWorld::exitFullscreen):
672         * platform/graphics/gstreamer/GStreamerGWorld.h:
673         (WebCore::GStreamerGWorld::isFullscreen):
674         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
675         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
676         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
677         (webkit_video_sink_render):
678         (webkit_video_sink_new):
679         * platform/graphics/gstreamer/VideoSinkGStreamer.h:
680
681 2011-09-29  Tim Horton  <timothy_horton@apple.com>
682
683         REGRESSION(87010): elements in ECMA-cloud neither filled nor blurred
684         https://bugs.webkit.org/show_bug.cgi?id=68679
685         <rdar://problem/10204649>
686
687         Reviewed by Nikolas Zimmermann.
688
689         Strip prefixes from SVG attributes before testing if they're supported.
690         Namespaced attributes will be matched using their namespace instead of
691         the (user-choosable) prefix.
692
693         Test: svg/custom/xlink-custom-namespace.svg
694
695         * svg/SVGAElement.cpp:
696         (WebCore::SVGAElement::isSupportedAttribute):
697         * svg/SVGAnimateMotionElement.cpp:
698         (WebCore::SVGAnimateMotionElement::isSupportedAttribute):
699         * svg/SVGAnimateTransformElement.cpp:
700         (WebCore::SVGAnimateTransformElement::isSupportedAttribute):
701         * svg/SVGAnimationElement.cpp:
702         (WebCore::SVGAnimationElement::isSupportedAttribute):
703         * svg/SVGCircleElement.cpp:
704         (WebCore::SVGCircleElement::isSupportedAttribute):
705         * svg/SVGClipPathElement.cpp:
706         (WebCore::SVGClipPathElement::isSupportedAttribute):
707         * svg/SVGComponentTransferFunctionElement.cpp:
708         (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute):
709         * svg/SVGCursorElement.cpp:
710         (WebCore::SVGCursorElement::isSupportedAttribute):
711         * svg/SVGElement.h:
712         (WebCore::SVGAttributeHashTranslator::hash):
713         (WebCore::SVGAttributeHashTranslator::equal):
714         * svg/SVGEllipseElement.cpp:
715         (WebCore::SVGEllipseElement::isSupportedAttribute):
716         * svg/SVGExternalResourcesRequired.h:
717         * svg/SVGFEBlendElement.cpp:
718         (WebCore::SVGFEBlendElement::isSupportedAttribute):
719         * svg/SVGFEColorMatrixElement.cpp:
720         (WebCore::SVGFEColorMatrixElement::isSupportedAttribute):
721         * svg/SVGFEComponentTransferElement.cpp:
722         (WebCore::SVGFEComponentTransferElement::isSupportedAttribute):
723         * svg/SVGFECompositeElement.cpp:
724         (WebCore::SVGFECompositeElement::isSupportedAttribute):
725         * svg/SVGFEConvolveMatrixElement.cpp:
726         (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute):
727         * svg/SVGFEDiffuseLightingElement.cpp:
728         (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute):
729         * svg/SVGFEDisplacementMapElement.cpp:
730         (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute):
731         * svg/SVGFEDropShadowElement.cpp:
732         (WebCore::SVGFEDropShadowElement::isSupportedAttribute):
733         * svg/SVGFEGaussianBlurElement.cpp:
734         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
735         * svg/SVGFEImageElement.cpp:
736         (WebCore::SVGFEImageElement::isSupportedAttribute):
737         * svg/SVGFELightElement.cpp:
738         (WebCore::SVGFELightElement::isSupportedAttribute):
739         * svg/SVGFEMergeNodeElement.cpp:
740         (WebCore::SVGFEMergeNodeElement::isSupportedAttribute):
741         * svg/SVGFEMorphologyElement.cpp:
742         (WebCore::SVGFEMorphologyElement::isSupportedAttribute):
743         * svg/SVGFEOffsetElement.cpp:
744         (WebCore::SVGFEOffsetElement::isSupportedAttribute):
745         * svg/SVGFESpecularLightingElement.cpp:
746         (WebCore::SVGFESpecularLightingElement::isSupportedAttribute):
747         * svg/SVGFETileElement.cpp:
748         (WebCore::SVGFETileElement::isSupportedAttribute):
749         * svg/SVGFETurbulenceElement.cpp:
750         (WebCore::SVGFETurbulenceElement::isSupportedAttribute):
751         * svg/SVGFilterElement.cpp:
752         (WebCore::SVGFilterElement::isSupportedAttribute):
753         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
754         (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
755         * svg/SVGForeignObjectElement.cpp:
756         (WebCore::SVGForeignObjectElement::isSupportedAttribute):
757         * svg/SVGGElement.cpp:
758         (WebCore::SVGGElement::isSupportedAttribute):
759         * svg/SVGGradientElement.cpp:
760         (WebCore::SVGGradientElement::isSupportedAttribute):
761         * svg/SVGImageElement.cpp:
762         (WebCore::SVGImageElement::isSupportedAttribute):
763         * svg/SVGLineElement.cpp:
764         (WebCore::SVGLineElement::isSupportedAttribute):
765         * svg/SVGLinearGradientElement.cpp:
766         (WebCore::SVGLinearGradientElement::isSupportedAttribute):
767         * svg/SVGMPathElement.cpp:
768         (WebCore::SVGMPathElement::isSupportedAttribute):
769         * svg/SVGMarkerElement.cpp:
770         (WebCore::SVGMarkerElement::isSupportedAttribute):
771         * svg/SVGMaskElement.cpp:
772         (WebCore::SVGMaskElement::isSupportedAttribute):
773         * svg/SVGPathElement.cpp:
774         (WebCore::SVGPathElement::isSupportedAttribute):
775         * svg/SVGPatternElement.cpp:
776         (WebCore::SVGPatternElement::isSupportedAttribute):
777         * svg/SVGPolyElement.cpp:
778         (WebCore::SVGPolyElement::isSupportedAttribute):
779         * svg/SVGRadialGradientElement.cpp:
780         (WebCore::SVGRadialGradientElement::isSupportedAttribute):
781         * svg/SVGRectElement.cpp:
782         (WebCore::SVGRectElement::isSupportedAttribute):
783         * svg/SVGScriptElement.cpp:
784         (WebCore::SVGScriptElement::isSupportedAttribute):
785         * svg/SVGStopElement.cpp:
786         (WebCore::SVGStopElement::isSupportedAttribute):
787         * svg/SVGStyleElement.cpp:
788         (WebCore::SVGStyleElement::isSupportedAttribute):
789         * svg/SVGStyledTransformableElement.cpp:
790         (WebCore::SVGStyledTransformableElement::isSupportedAttribute):
791         * svg/SVGSymbolElement.cpp:
792         (WebCore::SVGSymbolElement::isSupportedAttribute):
793         * svg/SVGTRefElement.cpp:
794         (WebCore::SVGTRefElement::isSupportedAttribute):
795         * svg/SVGTextContentElement.cpp:
796         (WebCore::SVGTextContentElement::isSupportedAttribute):
797         * svg/SVGTextElement.cpp:
798         (WebCore::SVGTextElement::isSupportedAttribute):
799         * svg/SVGTextPathElement.cpp:
800         (WebCore::SVGTextPathElement::isSupportedAttribute):
801         * svg/SVGTextPositioningElement.cpp:
802         (WebCore::SVGTextPositioningElement::isSupportedAttribute):
803         * svg/SVGURIReference.cpp:
804         (WebCore::SVGURIReference::addSupportedAttributes):
805         * svg/SVGUseElement.cpp:
806         (WebCore::SVGUseElement::isSupportedAttribute):
807         * svg/SVGViewElement.cpp:
808         (WebCore::SVGViewElement::isSupportedAttribute):
809
810 2011-09-28  Kentaro Hara  <haraken@chromium.org>
811
812         "ScriptValue" arguments of PopStateEvent methods should be "const ScriptValue&"
813         https://bugs.webkit.org/show_bug.cgi?id=68984
814
815         Reviewed by Darin Adler.
816
817         Just a follow-up fix for the bug 68345. For performance,
818         "ScriptValue" arguments of PopStateEvent methods should be "const ScriptValue&".
819
820         Tests: fast/events/constructors/pop-state-event-constructor.html
821                fast/events/fire-popstate-event.html
822
823         * dom/PopStateEvent.cpp:
824         (WebCore::PopStateEvent::PopStateEvent):
825         (WebCore::PopStateEvent::create):
826         (WebCore::PopStateEvent::initPopStateEvent):
827         * dom/PopStateEvent.h:
828
829 2011-09-28  Martin Robinson  <mrobinson@igalia.com>
830
831         [GTK] Move drag-and-drop code which can be shared with WebKit2 to WebCore
832         https://bugs.webkit.org/show_bug.cgi?id=66890
833
834         Added a GtkDragAndDropHelper class to hold all the logic that is common
835         between WebKit1 and WebKit2. This will allow greater code sharing between
836         the two ports.
837
838         Reviewed by Philippe Normand.
839
840         No new tests. This patch should not change behavior.
841
842         * GNUmakefile.list.am: Added the GtkDragAndDropHelper to the sources list.
843         * platform/gtk/GtkDragAndDropHelper.cpp: Added.
844         * platform/gtk/GtkDragAndDropHelper.h: Added.
845
846 2011-09-28  Dan Bernstein  <mitz@apple.com>
847
848         <rdar://problem/10196497> first-letter after list marker not updated correctly
849
850         Reviewed by Simon Fraser.
851
852         Test: fast/dynamic/first-letter-after-list-marker.html
853
854         * rendering/RenderBlock.cpp:
855         (WebCore::RenderBlock::updateFirstLetter): Improved the logic for continuing past list markers
856         when trying to locate a first letter to update.
857
858 2011-09-28  Kent Tamura  <tkent@chromium.org>
859
860         REGRESSION(r93858): Can't type anything into input elements when maxlength is greater than 2^31
861         https://bugs.webkit.org/show_bug.cgi?id=68981
862
863         Reviewed by Darin Adler.
864
865         * html/parser/HTMLParserIdioms.cpp:
866         (WebCore::parseHTMLInteger):
867         Check the failure of charactersToIntStrict().
868         (WebCore::parseHTMLNonNegativeInteger):
869         Check the failure of charactersToUIntStrict().
870
871 2011-09-28  Antoine Labour  <piman@chromium.org>
872
873         Remove unused createRootLayerPainter from CCLayerTreeHostClient
874         https://bugs.webkit.org/show_bug.cgi?id=69042
875
876         Reviewed by James Robinson.
877
878         No new test needed: no semantic change.
879
880         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
881
882 2011-09-28  Luke Macpherson   <macpherson@chromium.org>
883
884         Only resolve direction aware properties when properties are direction aware.
885         https://bugs.webkit.org/show_bug.cgi?id=68968
886
887         Reviewed by Eric Seidel.
888
889         No new tests / no functionality changed.
890
891         Profiling showed a ~8% improvement in applyProperty by not calling resolveDirectionAwareProperty for every property.
892
893         * css/CSSStyleSelector.cpp:
894         (WebCore::CSSStyleSelector::applyProperty):
895
896 2011-09-28  Simon Fraser  <simon.fraser@apple.com>
897
898         fast/dom/scroll-element-to-rect.html fails on WK1 Mac port
899         https://bugs.webkit.org/show_bug.cgi?id=68815
900
901         Reviewed by Dan Bernstein.
902         
903         FrameView::scrollElementToRect() was incorrectly using Element::boundsInWindowSpace(),
904         which is window-relative (not web view-relative), and has flipped coordinates
905         in WebKit1.
906         
907         Change to use Node::getRect() which is what the author intended.
908
909         * dom/Element.h:
910         * page/FrameView.cpp:
911         (WebCore::FrameView::scrollElementToRect):
912
913 2011-09-28  Peter Beverloo  <peter@chromium.org>
914
915         Don't clamp cubic-bezier timing functions between 0 and 1
916         https://bugs.webkit.org/show_bug.cgi?id=45761
917
918         Remove the limitation of clamping the cubic-bezier timing function
919         values between 0 and 1, following the specification change made on
920         April 5 of this year.
921
922         Reviewed by Dean Jackson.
923
924         Tests: transitions/cubic-bezier-overflow-color.html
925                transitions/cubic-bezier-overflow-length.html
926                transitions/cubic-bezier-overflow-shadow.html
927                transitions/cubic-bezier-overflow-svg-length.html
928                transitions/cubic-bezier-overflow-transform.html
929
930         * css/CSSParser.cpp:
931         (WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
932
933 2011-09-28  Chris Rogers  <crogers@google.com>
934
935         DelayNode must set the context on delayTime AudioParam to support automation
936         https://bugs.webkit.org/show_bug.cgi?id=68828
937
938         Reviewed by Kenneth Russell.
939
940         Test: webaudio/delaynode-scheduling.html
941
942         * webaudio/DelayNode.cpp:
943         (WebCore::DelayNode::DelayNode):
944
945 2011-09-28  Sergey Glazunov  <serg.glazunov@gmail.com>
946
947         JavaScript generated documents don't inherit the cookie URL
948         https://bugs.webkit.org/show_bug.cgi?id=69003
949
950         Reviewed by Adam Barth.
951
952         Test: http/tests/security/cookies/cookie-theft-with-javascript-doc.html
953
954         * dom/Document.h:
955         (WebCore::Document::setCookieURL):
956         * loader/DocumentWriter.cpp:
957         (WebCore::DocumentWriter::replaceDocument):
958         (WebCore::DocumentWriter::begin):
959         * loader/DocumentWriter.h:
960
961 2011-09-27  Dimitri Glazkov  <dglazkov@chromium.org>
962
963         REGRESSION(r95573): Crash when loading SVG documents in a flattened frame or any SVG document in Chromium/Mac.
964         https://bugs.webkit.org/show_bug.cgi?id=68938
965
966         Reviewed by David Hyatt.
967
968         Test: all svg tests in LayoutTests.
969
970         * rendering/RenderBlock.cpp:
971         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): Added a null-check for containingBlock.
972
973 2011-09-28  Una Sabovic  <una.sabovic@palm.com>
974
975         Setting innerText to an empty string on editable div loses focus
976         https://bugs.webkit.org/show_bug.cgi?id=62092
977
978         Reviewed by Ryosuke Niwa.
979
980         When selection start or end node is being deleted do not clear the selection.
981         Instead update the start/end position to an equivalent parent-anchored positions.
982         When text is inserted/deleted update selection per range modification spec:
983         http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-Mutation
984
985         Tests: editing/selection/document-mutation.html
986                editing/selection/editable-div-clear-on-keydown.html
987
988         * editing/FrameSelection.cpp:
989         (WebCore::FrameSelection::respondToNodeModification):
990         (WebCore::updatePositionAfterAdoptingTextReplacement):
991         (WebCore::FrameSelection::textWillBeReplaced):
992         * editing/htmlediting.cpp:
993         (WebCore::updatePositionForNodeRemoval):
994
995 2011-09-28  Joseph Pecoraro  <joepeck@webkit.org>
996
997         FTPDirectoryDocument Shows Garbled String for Last Modified Date
998         https://bugs.webkit.org/show_bug.cgi?id=69011
999
1000         Reviewed by Dan Bernstein.
1001
1002         Force WTF::String concatenation instead of an accidental char* pointer addition.
1003
1004         * html/FTPDirectoryDocument.cpp:
1005         (WebCore::processFileDateString):
1006
1007 2011-09-28  Nate Chapin  <japhet@chromium.org>
1008
1009         Fix a regression in r96060. ResourceLoader shouldn't get
1010         initialized with a null DocumentLoader.
1011         https://bugs.webkit.org/show_bug.cgi?id=69004
1012
1013         Reviewed by Csaba Osztrogonác.
1014
1015         This should fix a debug crash in some platforms in
1016         plugins/js-from-destroy.html
1017
1018         * loader/ResourceLoader.cpp:
1019         (WebCore::ResourceLoader::init): Move the activeDocumentLoader() null checks back
1020             to SubresouceLoader::create().
1021         * loader/SubresourceLoader.cpp:
1022         (WebCore::SubresourceLoader::create):
1023
1024 2011-09-28  Adam Barth  <abarth@webkit.org>
1025
1026         CSP doesn't work for a wide variety of cases
1027         https://bugs.webkit.org/show_bug.cgi?id=68921
1028
1029         Reviewed by Darin Adler.
1030
1031         Patch suggested by Sam Weinig.  It's unclear to me how to test this
1032         change because all our tests run on non-default ports, which is why we
1033         have this bug in the first place.  Mozilla uses a proxy while testing
1034         so they can test with URLs like http://example.com, but we don't have
1035         such a facility.
1036
1037         * page/ContentSecurityPolicy.cpp:
1038         (WebCore::CSPSource::portMatches):
1039
1040 2011-09-28  Fady Samuel  <fsamuel@chromium.org>
1041
1042         [Chromium] Seperate GTK specific Gyp rules from X11 Gyp rules
1043         https://bugs.webkit.org/show_bug.cgi?id=68936
1044
1045         Reviewed by Tony Chang.
1046
1047         Chromium need to be built without Gtk for future version of ChromiumOS.
1048
1049         * WebCore.gyp/WebCore.gyp:
1050
1051 2011-09-28  Tom Sepez  <tsepez@chromium.org>
1052
1053         Revert change which broke displaying end script tags in view-source, instead
1054         deal with any trailing </script> tag included by mistake in the XSSAuditor
1055         itself.  Correct tests to detect the missing close tags.
1056         https://bugs.webkit.org/show_bug.cgi?id=68898
1057
1058         Reviewed by Adam Barth.
1059
1060         * html/parser/HTMLSourceTracker.cpp:
1061         (WebCore::HTMLSourceTracker::end):
1062         * html/parser/HTMLTokenizer.cpp:
1063         (WebCore::HTMLTokenizer::nextToken):
1064         * html/parser/XSSAuditor.cpp:
1065         (WebCore::startsHTMLEndTagAt):
1066         (WebCore::XSSAuditor::snippetForJavaScript):
1067
1068 2011-09-28  Adam Barth  <abarth@webkit.org>
1069
1070         Remove empty directories.
1071
1072         * editing/brew: Removed.
1073         * page/brew: Removed.
1074         * platform/brew: Removed.
1075         * platform/graphics/brew: Removed.
1076         * platform/network/brew: Removed.
1077         * platform/text/brew: Removed.
1078
1079 2011-09-28  Ilya Tikhonovsky  <loislo@chromium.org>
1080
1081         Web Inspector: optional arguments support for the frontend needs to be extended.
1082         https://bugs.webkit.org/show_bug.cgi?id=69005
1083
1084         Generator supports optional arguments but they are transferred by value.
1085         It is not suitable if the used type doesn't have operator bool.
1086         I'll transfer such arguments by pointer.
1087
1088         Reviewed by Pavel Feldman.
1089
1090         Build is the test.
1091
1092         * inspector/CodeGeneratorInspector.pm:
1093         (generateFrontendFunction):
1094         (paramTypeTraits):
1095         * inspector/InspectorDebuggerAgent.cpp:
1096         (WebCore::InspectorDebuggerAgent::didParseSource):
1097         * inspector/InspectorResourceAgent.cpp:
1098         (WebCore::InspectorResourceAgent::didFailLoading):
1099
1100 2011-09-28  Antaryami Pandia  <antaryami.pandia@motorola.com>
1101
1102         Reflected attribute input.size wraps on negative values (Chrome), or
1103         returns them (Safari).
1104         https://bugs.webkit.org/show_bug.cgi?id=44886
1105
1106         Reviewed by Darin Adler.
1107
1108         Test: fast/dom/HTMLInputElement/input-size-attribute.html
1109
1110         * html/HTMLInputElement.cpp:
1111         (WebCore::HTMLInputElement::parseMappedAttribute):
1112
1113 2011-09-28  Vsevolod Vlasov  <vsevik@chromium.org>
1114
1115         Web Inspector: Add support for search in single resource to page agent.
1116         https://bugs.webkit.org/show_bug.cgi?id=68998
1117
1118         Reviewed by Pavel Feldman.
1119
1120         Test: http/tests/inspector/search/search-in-resource.html
1121
1122         * inspector/ContentSearchUtils.cpp:
1123         (WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
1124         * inspector/ContentSearchUtils.h:
1125         * inspector/Inspector.json:
1126         * inspector/InspectorPageAgent.cpp:
1127         (WebCore::buildObjectForSearchMatch):
1128         (WebCore::InspectorPageAgent::searchInResource):
1129         * inspector/InspectorPageAgent.h:
1130         * inspector/front-end/Resource.js:
1131         (WebInspector.Resource.prototype.searchInContent):
1132         * inspector/front-end/SourceFile.js:
1133         (WebInspector.ResourceContentProvider.prototype.requestContent):
1134         (WebInspector.ResourceContentProvider.prototype.searchInContent):
1135         * inspector/front-end/UISourceCode.js:
1136         (WebInspector.ContentProvider.prototype.requestContent):
1137         (WebInspector.ContentProvider.prototype.searchInContent):
1138
1139 2011-09-28  Ilya Tikhonovsky  <loislo@chromium.org>
1140
1141         Web Inspector: It'd be useful to have performance stats for the back-end to front-end communication channel.
1142         https://bugs.webkit.org/show_bug.cgi?id=69002
1143
1144         Reviewed by Yury Semikhatsky.
1145
1146         * inspector/CodeGeneratorInspector.pm:
1147
1148 2011-09-27  Pavel Podivilov  <podivilov@chromium.org>
1149
1150         Web Inspector: live edit cursor always appears at the beginning of the file.
1151         https://bugs.webkit.org/show_bug.cgi?id=68900
1152
1153         Reviewed by Pavel Feldman.
1154
1155         * inspector/front-end/TextViewer.js:
1156         (WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing):
1157
1158 2011-09-28  Vsevolod Vlasov  <vsevik@chromium.org>
1159
1160         Web Inspector: Refactor searching in inspector, add test (fixed non regex search).
1161         https://bugs.webkit.org/show_bug.cgi?id=68930
1162
1163         Reviewed by Yury Semikhatsky.
1164
1165         Search moved out from page agent.
1166         Fixed search for non regex case which is not yet used.
1167
1168         Test: http/tests/inspector/search/search-in-resources.html
1169
1170         * CMakeLists.txt:
1171         * GNUmakefile.list.am:
1172         * WebCore.gypi:
1173         * WebCore.pro:
1174         * WebCore.vcproj/WebCore.vcproj:
1175         * WebCore.xcodeproj/project.pbxproj:
1176         * inspector/ContentSearchUtils.cpp: Added.
1177         (WebCore::ContentSearchUtils::createSearchRegexSource):
1178         (WebCore::ContentSearchUtils::createSearchRegex):
1179         (WebCore::ContentSearchUtils::countRegularExpressionMatches):
1180         * inspector/ContentSearchUtils.h: Added.
1181         * inspector/InspectorPageAgent.cpp:
1182         (WebCore::hasTextContent):
1183         (WebCore::InspectorPageAgent::cachedResourceContent):
1184         (WebCore::textContentForCachedResource):
1185         (WebCore::buildObjectForSearchResult):
1186         (WebCore::InspectorPageAgent::searchInResources):
1187         * inspector/front-end/utilities.js:
1188         ():
1189
1190 2011-09-28  Kentaro Hara  <haraken@chromium.org>
1191
1192         Implement a PopStateEvent constructor for V8
1193         https://bugs.webkit.org/show_bug.cgi?id=68896
1194
1195         Reviewed by Adam Barth.
1196
1197         Test: fast/events/constructors/pop-state-event-constructor.html
1198
1199         * bindings/v8/custom/V8EventConstructors.cpp: Added a PopStateEvent constructor.
1200         * dom/PopStateEvent.idl: Added a 'V8CustomConstructor' attribute.
1201
1202 2011-09-28  No'am Rosenthal  <noam.rosenthal@nokia.com>
1203
1204         [Texmap] Allow TextureMapperGL to work without a GraphicsContext
1205         https://bugs.webkit.org/show_bug.cgi?id=68980
1206
1207         Reviewed by Andreas Kling.
1208
1209         Perform a null-check for m_context and initialize that variable.
1210         If a graphics-context doesn't exist, we don't need to reset it.
1211
1212         No new functionality so no new tests.
1213
1214         * platform/graphics/opengl/TextureMapperGL.cpp:
1215         (WebCore::TextureMapperGL::TextureMapperGL):
1216         (WebCore::TextureMapperGL::beginPainting):
1217         (WebCore::TextureMapperGL::endPainting):
1218
1219 2011-09-28  Kentaro Hara  <haraken@chromium.org>
1220
1221         Implement an ErrorEvent constructor for V8
1222         https://bugs.webkit.org/show_bug.cgi?id=68336
1223
1224         Reviewed by Adam Barth.
1225
1226         Test: fast/events/constructors/error-event-constructor.html
1227
1228         * bindings/v8/OptionsObject.cpp:
1229         (WebCore::OptionsObject::getKeyValue): Returns an unsigned value corresponding to a given key.
1230         * bindings/v8/OptionsObject.h:
1231         * bindings/v8/custom/V8EventConstructors.cpp: Added the ErrorEvent constructor.
1232         * dom/ErrorEvent.idl: Added a 'V8CustomConstructor' attribute.
1233
1234 2011-09-27  Andy Estes  <aestes@apple.com>
1235
1236         WebKitLinkedOnOrAfter() check is ineffective for Solar Walk app-specific hack.
1237         https://bugs.webkit.org/show_bug.cgi?id=68863
1238
1239         Reviewed by Darin Adler.
1240
1241         The SolarWalk binary does not link against WebKit.framework directly,
1242         so calling NSVersionOfLinkTimeLibrary() will not return the version of
1243         WebKit against which SolarWalk was linked. Since Solar Walk has
1244         released an update that addresses the issue for which this app-specific
1245         hack was originally added, we should just remove the hack.
1246
1247         * WebCore.exp.in: Remove applicationIsSolarWalkMac().
1248         * platform/RuntimeApplicationChecks.cpp: Ditto.
1249         * platform/RuntimeApplicationChecks.h: Ditto.
1250
1251 2011-09-28  Tim Horton  <timothy_horton@apple.com>
1252
1253         Fix potential SVG performance regression (over-invalidation of caches) from 96052
1254         https://bugs.webkit.org/show_bug.cgi?id=68941
1255         <rdar://problem/10196224>
1256
1257         Reviewed by Zoltan Herczeg.
1258
1259         Only invalidate the cache of a filter when target style changes, as of the different types of cached
1260         resources, only filters make use of the style of the target element and thus need to be invalidated
1261         when the target style changes.
1262
1263         No new tests, performance improvement.
1264
1265         * rendering/svg/SVGResourcesCache.cpp:
1266         (WebCore::SVGResourcesCache::clientUpdatedFromElement):
1267
1268 2011-09-28  Adenilson Cavalcanti  <adenilson.silva@openbossa.org>
1269
1270         Missing initialization of member in ImageFrameQt class
1271         https://bugs.webkit.org/show_bug.cgi?id=68943
1272
1273         Reviewed by Kenneth Rohde Christiansen.
1274
1275         No new tests, this fixes internal implementation detail.
1276
1277         * platform/image-decoders/qt/ImageFrameQt.cpp:
1278         (WebCore::ImageFrame::ImageFrame):
1279         (WebCore::ImageFrame::operator=):
1280
1281 2011-09-27  Luke Macpherson   <macpherson@chromium.org>
1282
1283         Defer call to CSSValue::isPrimitiveValue(), saves ~4% in CSSStyleSelector::applyProperty().
1284         https://bugs.webkit.org/show_bug.cgi?id=68964
1285
1286         Reviewed by Eric Seidel.
1287
1288         No new tests / no functionality changed.
1289
1290         Doing value->isPrimitiveValue() is relatviely expensive, so moving it after the early returns but
1291         before the result is used saves a significant number of cycles. (Tested with Shark profiler in Safari).
1292
1293         * css/CSSStyleSelector.cpp:
1294         (WebCore::CSSStyleSelector::applyProperty):
1295
1296 2011-09-27  Ryosuke Niwa  <rniwa@webkit.org>
1297
1298         Simplify ReplaceSelectionCommand::positionAtStartOfInsertedContent
1299         https://bugs.webkit.org/show_bug.cgi?id=68939
1300
1301         Reviewed by Darin Adler.
1302
1303         Simplified ReplaceSelectionCommand::positionAtStartOfInsertedContent.
1304
1305         This change revealed a bug in removeUnrenderedTextNodesAtEnds that text nodes without any visible
1306         text at ends are not removed when it has a render object. Fixed the bug by checking the length of
1307         the rendered text. (Tested by editing/pasteboard/pasting-word-in-div-extra-line.html)
1308
1309         This further revealed that caretMaxRenderedOffset doesn't return an offset and caretMaxRenderedOffset
1310         on InlineBox, InlineTextBox, RenderObject, RenderBR, RenderPlaced are never called. To address this
1311         issue, renamed caretMaxRenderedOffset to renderedTextLength for RenderText and removed the rest.
1312
1313         * dom/Position.cpp:
1314         (WebCore::Position::rendersInDifferentPosition):
1315         * editing/ReplaceSelectionCommand.cpp:
1316         (WebCore::nodeHasVisibleRenderText): Added.
1317         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Calls nodeHasVisibleRenderText.
1318         (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent): Simplified.
1319         * editing/visible_units.cpp:
1320         (WebCore::startOfParagraph): Calls renderedTextLength.
1321         (WebCore::endOfParagraph): Ditto.
1322         * rendering/InlineBox.cpp: Removed caretMaxRenderedOffset.
1323         * rendering/InlineBox.h: Ditto.
1324         * rendering/InlineTextBox.cpp: Ditto.
1325         * rendering/InlineTextBox.h: Ditto.
1326         * rendering/RenderBR.cpp: Ditto.
1327         * rendering/RenderBR.h: Ditto.
1328         * rendering/RenderObject.cpp: Ditto.
1329         * rendering/RenderObject.h: Ditto.
1330         * rendering/RenderReplaced.cpp: Ditto.
1331         * rendering/RenderReplaced.h: Ditto.
1332         * rendering/RenderText.cpp:
1333         (WebCore::RenderText::renderedTextLength): Renamed from caretMaxRenderedOffset.
1334         * rendering/RenderText.h:
1335
1336 2011-09-27  James Robinson  <jamesr@chromium.org>
1337
1338         [chromium] LayerRenderChromium asserts about leaking textures.
1339         https://bugs.webkit.org/show_bug.cgi?id=68190
1340
1341         Reviewed by Kenneth Russell.
1342
1343         This introduces an interface TextureAllocator that the TextureManager uses to allocate/deallocate textures.
1344         This means that TextureManager does not need to depend directly on GraphicsContext3D, other than for the format
1345         enum type, making it more testable.  It also allows us to track the allocations by subclassing TextureAllocator
1346         to make sure we aren't leaking any textures.
1347
1348         * WebCore.gypi:
1349         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1350         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
1351         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1352         * platform/graphics/chromium/ImageLayerChromium.cpp:
1353         (WebCore::ImageLayerTextureUpdater::updateTextureRect):
1354         * platform/graphics/chromium/LayerChromium.h:
1355         (WebCore::LayerChromium::updateCompositorResources):
1356         * platform/graphics/chromium/LayerRendererChromium.cpp:
1357         (WebCore::LayerRendererChromium::LayerRendererChromium):
1358         (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures):
1359         (WebCore::LayerRendererChromium::drawLayers):
1360         (WebCore::LayerRendererChromium::useRenderSurface):
1361         (WebCore::LayerRendererChromium::initializeSharedObjects):
1362         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1363         * platform/graphics/chromium/LayerRendererChromium.h:
1364         (WebCore::LayerRendererChromium::renderSurfaceTextureAllocator):
1365         (WebCore::LayerRendererChromium::contentsTextureAllocator):
1366         * platform/graphics/chromium/LayerTextureUpdater.h:
1367         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
1368         (WebCore::LayerTextureUpdaterBitmap::updateTextureRect):
1369         (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
1370         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
1371         * platform/graphics/chromium/ManagedTexture.cpp:
1372         (WebCore::ManagedTexture::bindTexture):
1373         (WebCore::ManagedTexture::framebufferTexture2D):
1374         * platform/graphics/chromium/ManagedTexture.h:
1375         * platform/graphics/chromium/TextureManager.cpp:
1376         (WebCore::TextureManager::memoryUseBytes):
1377         (WebCore::TextureManager::deleteEvictedTextures):
1378         (WebCore::TextureManager::evictAndDeleteAllTextures):
1379         (WebCore::TextureManager::removeTexture):
1380         (WebCore::TextureManager::allocateTexture):
1381         (WebCore::TextureManager::requestTexture):
1382         * platform/graphics/chromium/TextureManager.h:
1383         (WebCore::TextureAllocator::~TextureAllocator):
1384         * platform/graphics/chromium/TiledLayerChromium.cpp:
1385         (WebCore::TiledLayerChromium::updateCompositorResources):
1386         * platform/graphics/chromium/TiledLayerChromium.h:
1387         * platform/graphics/chromium/TrackingTextureAllocator.cpp: Added.
1388         (WebCore::TrackingTextureAllocator::TrackingTextureAllocator):
1389         (WebCore::TrackingTextureAllocator::~TrackingTextureAllocator):
1390         (WebCore::TrackingTextureAllocator::createTexture):
1391         (WebCore::TrackingTextureAllocator::deleteTexture):
1392         * platform/graphics/chromium/TrackingTextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/ManagedTexture.h.
1393         (WebCore::TrackingTextureAllocator::create):
1394         (WebCore::TrackingTextureAllocator::currentMemoryUseBytes):
1395         * platform/graphics/chromium/VideoLayerChromium.cpp:
1396         (WebCore::VideoLayerChromium::updateCompositorResources):
1397         (WebCore::VideoLayerChromium::updateTexture):
1398         * platform/graphics/chromium/VideoLayerChromium.h:
1399         * platform/graphics/chromium/WebGLLayerChromium.cpp:
1400         (WebCore::WebGLLayerChromium::updateCompositorResources):
1401         * platform/graphics/chromium/WebGLLayerChromium.h:
1402         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1403         (WebCore::CCHeadsUpDisplay::draw):
1404         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1405         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
1406         (WebCore::CCLayerTreeHost::deleteContentsTexturesOnCCThread):
1407         (WebCore::CCLayerTreeHost::commitToOnCCThread):
1408         (WebCore::CCLayerTreeHost::didRecreateGraphicsContext):
1409         (WebCore::CCLayerTreeHost::updateCompositorResources):
1410         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1411         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1412         (WebCore::CCLayerTreeHostImpl::contentsTextureAllocator):
1413         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
1414         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1415         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1416         (WebCore::CCRenderSurface::drawSurface):
1417         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1418         (WebCore::CCSingleThreadProxy::setNeedsCommit):
1419         (WebCore::CCSingleThreadProxy::stop):
1420         (WebCore::CCSingleThreadProxy::recreateContextIfNeeded):
1421         (WebCore::CCSingleThreadProxy::commitIfNeeded):
1422         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1423         (WebCore::CCThreadProxy::commitOnCCThread):
1424         (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread):
1425 2011-09-27  James Robinson  <jamesr@chromium.org>
1426
1427         [chromium] Only initiate the beginFrameAndCommit sequence if a commit has been requested
1428         https://bugs.webkit.org/show_bug.cgi?id=68967
1429
1430         Reviewed by Kenneth Russell.
1431
1432         When updating the scheduler state, we should only initiate a new commit flow if a commit has been requested (as
1433         opposed to only a redraw).
1434
1435         Covered by the unit test CCLayerTreeHostTestSetNeedsRedraw with USE(THREADED_COMPOSITING) set to true.
1436
1437         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1438         (WebCore::CCThreadProxy::updateSchedulerStateOnCCThread):
1439
1440 2011-09-27  Kentaro Hara  <haraken@chromium.com>
1441
1442         Implement a PageTransitionEvent constructor for V8
1443         https://bugs.webkit.org/show_bug.cgi?id=68067
1444
1445         Reviewed by Adam Barth.
1446
1447         Test: fast/events/constructors/page-transition-event-constructor.html
1448
1449         * bindings/v8/custom/V8EventConstructors.cpp: Added the PageTransitionEvent constructor.
1450         * dom/PageTransitionEvent.idl: Added a 'V8CustomConstructor' attribute.
1451
1452 2011-09-27  Kentaro Hara  <haraken@chromium.org>
1453
1454         Implement a MessageEvent constructor for JSC
1455         https://bugs.webkit.org/show_bug.cgi?id=68883
1456
1457         Reviewed by Adam Barth.
1458
1459         The spec for MessageEvent is here:
1460         http://www.whatwg.org/specs/web-apps/current-work/#messageevent
1461
1462         Currently, some tests in fast/events/constructors/message-event-constructor.html
1463         are failing or crashing in DRT, as we commented in the test file.
1464         This is because MessageEvent.data is implemented as SerializedScriptValue,
1465         and thus it cannot keep ScriptValue passed by JavaScript.
1466         This is the same issue as the bug (https://bugs.webkit.org/show_bug.cgi?id=68345).
1467         We will soon make a follow-up patch to fix these failures, after this
1468         patch is landed.
1469
1470         Test: fast/events/constructors/message-event-constructor.html
1471
1472         * bindings/generic/EventConstructors.h: Added a definition for the MessageEvent constructor.
1473         * bindings/js/JSDictionary.cpp:
1474         (WebCore::JSDictionary::convertValue): Generates MessagePortArray from the list of message ports in the format of JSValues.
1475         * bindings/js/JSDictionary.h:
1476         * bindings/js/JSEventConstructors.cpp: Added #includes for MessageEvent.
1477         * dom/MessageEvent.cpp:
1478         (WebCore::MessageEventInit::MessageEventInit):
1479         (WebCore::MessageEvent::MessageEvent):
1480         (WebCore::MessageEvent::initMessageEvent):
1481         * dom/MessageEvent.h: Added a definition for MessageEvent. Removed an extra leading spaces.
1482         (WebCore::MessageEvent::create):
1483         (WebCore::MessageEvent::origin):
1484         (WebCore::MessageEvent::lastEventId):
1485         (WebCore::MessageEvent::source):
1486         (WebCore::MessageEvent::ports):
1487         (WebCore::MessageEvent::dataType):
1488         (WebCore::MessageEvent::dataAsSerializedScriptValue):
1489         (WebCore::MessageEvent::dataAsString):
1490         (WebCore::MessageEvent::dataAsBlob):
1491         (WebCore::MessageEvent::dataAsArrayBuffer):
1492         * dom/MessageEvent.idl: Makes MessageEvent constructible.
1493
1494 2011-09-27  Eric Uhrhane  <ericu@chromium.org>
1495
1496         [Chromium/FileWriter] race condition in FileWriter completion can lead to assert
1497         https://bugs.webkit.org/show_bug.cgi?id=67684
1498
1499         Reviewed by David Levin.
1500
1501         Tests: fast/filesystem/file-writer-abort-continue.html
1502                fast/filesystem/file-writer-abort.html
1503
1504         Track the state of the backend and be prepared for reentrant user
1505         requests.  Limit recursion depth to an arbitrary small constant.
1506         * fileapi/FileWriter.cpp: Lots of event-handling changes.
1507         * fileapi/FileWriter.h:
1508
1509 2011-09-27  Mihai Parparita  <mihaip@chromium.org>
1510
1511         Unreviewed, rolling out r96141.
1512         http://trac.webkit.org/changeset/96141
1513         https://bugs.webkit.org/show_bug.cgi?id=68190
1514
1515         Breaks PrerenderBrowserTest.PrerenderHTML5Video in
1516         browser_tests
1517
1518         * WebCore.gypi:
1519         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1520         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
1521         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1522         * platform/graphics/chromium/ImageLayerChromium.cpp:
1523         (WebCore::ImageLayerTextureUpdater::updateTextureRect):
1524         * platform/graphics/chromium/LayerChromium.h:
1525         (WebCore::LayerChromium::updateCompositorResources):
1526         * platform/graphics/chromium/LayerRendererChromium.cpp:
1527         (WebCore::LayerRendererChromium::LayerRendererChromium):
1528         (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures):
1529         (WebCore::LayerRendererChromium::drawLayers):
1530         (WebCore::LayerRendererChromium::createLayerTexture):
1531         (WebCore::LayerRendererChromium::deleteLayerTexture):
1532         (WebCore::LayerRendererChromium::useRenderSurface):
1533         (WebCore::LayerRendererChromium::initializeSharedObjects):
1534         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1535         * platform/graphics/chromium/LayerRendererChromium.h:
1536         (WebCore::LayerRendererChromium::setContentsTextureMemoryUseBytes):
1537         * platform/graphics/chromium/LayerTextureUpdater.h:
1538         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
1539         (WebCore::LayerTextureUpdaterBitmap::updateTextureRect):
1540         (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
1541         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
1542         * platform/graphics/chromium/ManagedTexture.cpp:
1543         (WebCore::ManagedTexture::bindTexture):
1544         (WebCore::ManagedTexture::framebufferTexture2D):
1545         * platform/graphics/chromium/ManagedTexture.h:
1546         * platform/graphics/chromium/TextureManager.cpp:
1547         (WebCore::memoryUseBytes):
1548         (WebCore::TextureManager::deleteEvictedTextures):
1549         (WebCore::TextureManager::evictAndDeleteAllTextures):
1550         (WebCore::TextureManager::removeTexture):
1551         (WebCore::TextureManager::allocateTexture):
1552         (WebCore::TextureManager::requestTexture):
1553         * platform/graphics/chromium/TextureManager.h:
1554         * platform/graphics/chromium/TiledLayerChromium.cpp:
1555         (WebCore::TiledLayerChromium::updateCompositorResources):
1556         * platform/graphics/chromium/TiledLayerChromium.h:
1557         * platform/graphics/chromium/TrackingTextureAllocator.cpp: Removed.
1558         * platform/graphics/chromium/TrackingTextureAllocator.h: Removed.
1559         * platform/graphics/chromium/VideoLayerChromium.cpp:
1560         (WebCore::VideoLayerChromium::updateCompositorResources):
1561         (WebCore::VideoLayerChromium::updateTexture):
1562         * platform/graphics/chromium/VideoLayerChromium.h:
1563         * platform/graphics/chromium/WebGLLayerChromium.cpp:
1564         (WebCore::WebGLLayerChromium::updateCompositorResources):
1565         * platform/graphics/chromium/WebGLLayerChromium.h:
1566         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1567         (WebCore::CCHeadsUpDisplay::draw):
1568         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1569         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
1570         (WebCore::CCLayerTreeHost::deleteContentsTextures):
1571         (WebCore::CCLayerTreeHost::commitTo):
1572         (WebCore::CCLayerTreeHost::didRecreateGraphicsContext):
1573         (WebCore::CCLayerTreeHost::updateCompositorResources):
1574         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp.rej: Removed.
1575         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1576         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1577         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
1578         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1579         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1580         (WebCore::CCRenderSurface::drawSurface):
1581         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1582         (WebCore::CCSingleThreadProxy::setNeedsCommit):
1583         (WebCore::CCSingleThreadProxy::stop):
1584         (WebCore::CCSingleThreadProxy::recreateContextIfNeeded):
1585         (WebCore::CCSingleThreadProxy::commitIfNeeded):
1586         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1587         (WebCore::CCThreadProxy::commitOnCCThread):
1588         (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread):
1589
1590 2011-09-27  James Robinson  <jamesr@chromium.org>
1591
1592         [chromium] Guard accelerated skia drawing logic with its own define to remove dependency on USE(THREADED_COMPOSITING)
1593         https://bugs.webkit.org/show_bug.cgi?id=68953
1594
1595         Reviewed by Kenneth Russell.
1596
1597         The accelerated drawing code is incompatible with threaded compositing. Rather than tying the two behaviors
1598         together via USE(THREADED_COMPOSITING), this patch guards the accelerated drawing code with its own USE() guard
1599         so the features can advance independently. Today, it's not safe to set both of these flags.
1600
1601         * platform/graphics/chromium/ContentLayerChromium.cpp:
1602         (WebCore::ContentLayerChromium::createTextureUpdater):
1603         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
1604         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
1605
1606 2011-09-27  Luke Macpherson   <macpherson@chromium.org>
1607
1608         Slightly improve performance of CSSStyleApplyProperty handler lookup.
1609         https://bugs.webkit.org/show_bug.cgi?id=68868
1610
1611         Reviewed by Eric Seidel.
1612
1613         No new tests as no functionality changed.
1614
1615         * css/CSSStyleApplyProperty.h:
1616         (WebCore::CSSStyleApplyProperty::propertyHandler):
1617         Make propertyHandler() public and remove redirecting functions.
1618         * css/CSSStyleSelector.cpp:
1619         (WebCore::CSSStyleSelector::applyProperty):
1620         Perform property handler lookup once and reuse the result.
1621
1622 2011-09-27  Kent Tamura  <tkent@chromium.org>
1623
1624         [V8] element.dataset.nonExistingKey should return undefined.
1625         https://bugs.webkit.org/show_bug.cgi?id=68877
1626
1627         Reviewed by Nate Chapin.
1628
1629         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
1630         (WebCore::V8DOMStringMap::namedPropertyGetter): Uses v8StringOrUndefined() instead of v8String().
1631
1632 2011-09-23  Mark Hahnenberg  <mhahnenberg@apple.com>
1633
1634         Add static version of JSCell::visitChildren
1635         https://bugs.webkit.org/show_bug.cgi?id=68404
1636
1637         Reviewed by Darin Adler.
1638
1639         No new tests.
1640
1641         In this patch we just extract the bodies of the virtual visitChildren methods
1642         throughout the JSCell inheritance hierarchy out into static methods, which are 
1643         now called from the virtual methods.  This is an intermediate step in trying to 
1644         move the virtual-ness of visitChildren into our own custom vtable stored in 
1645         ClassInfo.  We need to convert the methods to static methods in order to be 
1646         able to more easily store and refer to them in our custom vtable since normal 
1647         member methods store some implicit information in their types, making it 
1648         impossible to store them generically in ClassInfo.
1649
1650         * WebCore.exp.in:
1651         * bindings/js/JSAttrCustom.cpp:
1652         (WebCore::JSAttr::visitChildrenVirtual):
1653         (WebCore::JSAttr::visitChildren):
1654         * bindings/js/JSAudioContextCustom.cpp:
1655         (WebCore::JSAudioContext::visitChildrenVirtual):
1656         (WebCore::JSAudioContext::visitChildren):
1657         * bindings/js/JSCSSRuleCustom.cpp:
1658         (WebCore::JSCSSRule::visitChildrenVirtual):
1659         (WebCore::JSCSSRule::visitChildren):
1660         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1661         (WebCore::JSCSSStyleDeclaration::visitChildrenVirtual):
1662         (WebCore::JSCSSStyleDeclaration::visitChildren):
1663         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1664         (WebCore::JSCanvasRenderingContext::visitChildrenVirtual):
1665         (WebCore::JSCanvasRenderingContext::visitChildren):
1666         * bindings/js/JSDOMGlobalObject.cpp:
1667         (WebCore::JSDOMGlobalObject::visitChildrenVirtual):
1668         (WebCore::JSDOMGlobalObject::visitChildren):
1669         * bindings/js/JSDOMGlobalObject.h:
1670         * bindings/js/JSDOMWindowCustom.cpp:
1671         (WebCore::JSDOMWindow::visitChildrenVirtual):
1672         (WebCore::JSDOMWindow::visitChildren):
1673         * bindings/js/JSDOMWindowShell.cpp:
1674         (WebCore::JSDOMWindowShell::visitChildrenVirtual):
1675         (WebCore::JSDOMWindowShell::visitChildren):
1676         * bindings/js/JSDOMWindowShell.h:
1677         * bindings/js/JSJavaScriptAudioNodeCustom.cpp:
1678         (WebCore::JSJavaScriptAudioNode::visitChildrenVirtual):
1679         (WebCore::JSJavaScriptAudioNode::visitChildren):
1680         * bindings/js/JSMessageChannelCustom.cpp:
1681         (WebCore::JSMessageChannel::visitChildrenVirtual):
1682         (WebCore::JSMessageChannel::visitChildren):
1683         * bindings/js/JSMessagePortCustom.cpp:
1684         (WebCore::JSMessagePort::visitChildrenVirtual):
1685         (WebCore::JSMessagePort::visitChildren):
1686         * bindings/js/JSNamedNodeMapCustom.cpp:
1687         (WebCore::JSNamedNodeMap::visitChildrenVirtual):
1688         (WebCore::JSNamedNodeMap::visitChildren):
1689         * bindings/js/JSNodeCustom.cpp:
1690         (WebCore::JSNode::visitChildrenVirtual):
1691         (WebCore::JSNode::visitChildren):
1692         * bindings/js/JSNodeFilterCustom.cpp:
1693         (WebCore::JSNodeFilter::visitChildrenVirtual):
1694         (WebCore::JSNodeFilter::visitChildren):
1695         * bindings/js/JSNodeIteratorCustom.cpp:
1696         (WebCore::JSNodeIterator::visitChildrenVirtual):
1697         (WebCore::JSNodeIterator::visitChildren):
1698         * bindings/js/JSSVGElementInstanceCustom.cpp:
1699         (WebCore::JSSVGElementInstance::visitChildrenVirtual):
1700         (WebCore::JSSVGElementInstance::visitChildren):
1701         * bindings/js/JSSharedWorkerCustom.cpp:
1702         (WebCore::JSSharedWorker::visitChildrenVirtual):
1703         (WebCore::JSSharedWorker::visitChildren):
1704         * bindings/js/JSStyleSheetCustom.cpp:
1705         (WebCore::JSStyleSheet::visitChildrenVirtual):
1706         (WebCore::JSStyleSheet::visitChildren):
1707         * bindings/js/JSTreeWalkerCustom.cpp:
1708         (WebCore::JSTreeWalker::visitChildrenVirtual):
1709         (WebCore::JSTreeWalker::visitChildren):
1710         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1711         (WebCore::JSWebGLRenderingContext::visitChildrenVirtual):
1712         (WebCore::JSWebGLRenderingContext::visitChildren):
1713         * bindings/js/JSWorkerContextCustom.cpp:
1714         (WebCore::JSWorkerContext::visitChildrenVirtual):
1715         (WebCore::JSWorkerContext::visitChildren):
1716         * bindings/js/JSXMLHttpRequestCustom.cpp:
1717         (WebCore::JSXMLHttpRequest::visitChildrenVirtual):
1718         (WebCore::JSXMLHttpRequest::visitChildren):
1719         * bindings/js/JSXPathResultCustom.cpp:
1720         (WebCore::JSXPathResult::visitChildrenVirtual):
1721         (WebCore::JSXPathResult::visitChildren):
1722         * bindings/scripts/CodeGeneratorJS.pm:
1723         (GenerateHeader):
1724         (GenerateImplementation):
1725         * bindings/scripts/test/JS/JSTestObj.cpp:
1726         (WebCore::JSTestObj::visitChildrenVirtual):
1727         (WebCore::JSTestObj::visitChildren):
1728         * bindings/scripts/test/JS/JSTestObj.h:
1729         * bridge/qt/qt_instance.cpp:
1730         (JSC::Bindings::QtRuntimeObject::visitChildrenVirtual):
1731         (JSC::Bindings::QtRuntimeObject::visitChildren):
1732         * bridge/qt/qt_runtime.cpp:
1733         (JSC::Bindings::QtRuntimeMetaMethod::visitChildrenVirtual):
1734         (JSC::Bindings::QtRuntimeMetaMethod::visitChildren):
1735         * bridge/qt/qt_runtime.h:
1736         * workers/WorkerContext.h:
1737
1738 <<<<<<< .mine
1739 2011-09-27  Mark Hahnenberg  <mhahnenberg@apple.com>
1740
1741         Add static version of JSCell::getCallData
1742         https://bugs.webkit.org/show_bug.cgi?id=68741
1743
1744         Reviewed by Darin Adler.
1745
1746         No new tests.
1747
1748         In this patch we just extract the bodies of the virtual getCallData methods
1749         throughout the JSCell inheritance hierarchy out into static methods, which are 
1750         now called from the virtual methods.  This is an intermediate step in trying to 
1751         move the virtual-ness of getCallData into our own method table stored in 
1752         ClassInfo.  We need to convert the methods to static methods because static methods 
1753         can be represented as function pointers rather than pointers to member functions, and
1754         function pointers are smaller and faster to call than pointers to member functions.
1755
1756         * WebCore.exp.in:
1757         * bindings/js/JSCallbackData.cpp:
1758         (WebCore::JSCallbackData::invokeCallback):
1759         * bindings/js/JSCustomXPathNSResolver.cpp:
1760         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1761         * bindings/js/JSErrorHandler.cpp:
1762         (WebCore::JSErrorHandler::handleEvent):
1763         * bindings/js/JSEventListener.cpp:
1764         (WebCore::JSEventListener::handleEvent):
1765         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1766         (WebCore::JSHTMLAllCollection::getCallDataVirtual):
1767         (WebCore::JSHTMLAllCollection::getCallData):
1768         * bindings/js/JSHTMLAppletElementCustom.cpp:
1769         (WebCore::JSHTMLAppletElement::getCallDataVirtual):
1770         (WebCore::JSHTMLAppletElement::getCallData):
1771         * bindings/js/JSHTMLEmbedElementCustom.cpp:
1772         (WebCore::JSHTMLEmbedElement::getCallDataVirtual):
1773         (WebCore::JSHTMLEmbedElement::getCallData):
1774         * bindings/js/JSHTMLObjectElementCustom.cpp:
1775         (WebCore::JSHTMLObjectElement::getCallDataVirtual):
1776         (WebCore::JSHTMLObjectElement::getCallData):
1777         * bindings/js/JSInjectedScriptHostCustom.cpp:
1778         (WebCore::JSInjectedScriptHost::evaluate):
1779         * bindings/js/JSPluginElementFunctions.cpp:
1780         (WebCore::runtimeObjectGetCallData):
1781         * bindings/scripts/CodeGeneratorJS.pm:
1782         (GenerateHeader):
1783         * bridge/objc/objc_runtime.h:
1784         * bridge/objc/objc_runtime.mm:
1785         (JSC::Bindings::ObjcFallbackObjectImp::getCallDataVirtual):
1786         (JSC::Bindings::ObjcFallbackObjectImp::getCallData):
1787         * bridge/qt/qt_runtime.cpp:
1788         (JSC::Bindings::QtRuntimeMetaMethod::getCallDataVirtual):
1789         (JSC::Bindings::QtRuntimeMetaMethod::getCallData):
1790         (JSC::Bindings::QtRuntimeConnectionMethod::call):
1791         (JSC::Bindings::QtRuntimeConnectionMethod::getCallDataVirtual):
1792         (JSC::Bindings::QtRuntimeConnectionMethod::getCallData):
1793         (JSC::Bindings::isJavaScriptFunction):
1794         * bridge/qt/qt_runtime.h:
1795         * bridge/runtime_method.cpp:
1796         (JSC::RuntimeMethod::getCallDataVirtual):
1797         (JSC::RuntimeMethod::getCallData):
1798         * bridge/runtime_method.h:
1799         * bridge/runtime_object.cpp:
1800         (JSC::Bindings::RuntimeObject::getCallDataVirtual):
1801         (JSC::Bindings::RuntimeObject::getCallData):
1802         * bridge/runtime_object.h:
1803
1804 =======
1805 2011-09-27  Dean Jackson  <dino@apple.com>
1806
1807         Unreviewed. Remove duplicate FilterOperation{s}.h that were
1808         accidentally added to the top level of the Xcode project.
1809
1810         * WebCore.xcodeproj/project.pbxproj:
1811
1812 >>>>>>> .r96163
1813 2011-09-27  David Hyatt  <hyatt@apple.com>
1814
1815         https://bugs.webkit.org/show_bug.cgi?id=68940
1816
1817         Narrow the float/lines pagination heuristic to only kick in if
1818         the previous line broke cleanly and if the floats are occurring
1819         at the start of the line.
1820
1821         Reviewed by Dan Bernstein.
1822
1823         * rendering/RenderBlockLineLayout.cpp:
1824         (WebCore::RenderBlock::positionNewFloatOnLine):
1825
1826 2011-09-27  James Robinson  <jamesr@chromium.org>
1827
1828         Add a mechanism to test for the compositing tree mutated during painting
1829         https://bugs.webkit.org/show_bug.cgi?id=68738
1830
1831         Reviewed by Adam Barth.
1832
1833         Sets a static bool during GraphicsLayer::paintGraphicsLayerContents and ASSERT()s that we never create or
1834         destroy a GraphicsLayer inside this function. Painting should never mutate the GraphicsLayer tree.
1835
1836         Test: compositing/video/video-with-invalid-source.html
1837
1838         * platform/graphics/GraphicsLayer.cpp:
1839         (WebCore::GraphicsLayer::GraphicsLayer):
1840         (WebCore::GraphicsLayer::~GraphicsLayer):
1841         (WebCore::GraphicsLayer::paintGraphicsLayerContents):
1842
1843 2011-09-27  Ojan Vafai  <ojan@chromium.org>
1844
1845         take padding/border on flexbox into account with direction:rtl
1846         https://bugs.webkit.org/show_bug.cgi?id=68846
1847
1848         Reviewed by David Hyatt.
1849
1850         Use the logicalWidth of the flexbox instead of it's availableLogicalWidth
1851         so that we include the flexbox's border and padding.
1852         
1853         Also, change all uses of availableLogicalWidth to contentLogicalWidth.
1854         The former takes multi-column into account. Multi-column flexboxes don't
1855         make any sense, so there's no point in calling availableLogicalWidth.
1856
1857         * rendering/RenderFlexibleBox.cpp:
1858         (WebCore::RenderFlexibleBox::flowAwareLogicalWidth):
1859         (WebCore::RenderFlexibleBox::flowAwareContentLogicalWidth):
1860         (WebCore::RenderFlexibleBox::computePreferredLogicalWidth):
1861         (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithmInlineDirection):
1862         (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection):
1863         * rendering/RenderFlexibleBox.h:
1864
1865 2011-09-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1866
1867         Unreviewed, rolling out r96139.
1868         http://trac.webkit.org/changeset/96139
1869         https://bugs.webkit.org/show_bug.cgi?id=68933
1870
1871         Broke table-percent-height.html on Mac bots (Requested by
1872         mwenge2 on #webkit).
1873
1874         * rendering/RenderBox.cpp:
1875         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1876         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1877         * rendering/RenderBox.h:
1878
1879 2011-09-27  Tim Horton  <timothy_horton@apple.com>
1880
1881         REGRESSION(65665): Pattern size being clamped to SVG size can prevent transformed elements from being fully covered by userSpaceOnUse patterns
1882         https://bugs.webkit.org/show_bug.cgi?id=67700
1883         <rdar://problem/10125102>
1884
1885         Reviewed by Darin Adler.
1886
1887         Clamp all resources to the same size, 4096x4096 (arbitrarily chosen), instead of to the size
1888         of the <svg> element. This fixes the case where a transformed element displays part of a resource
1889         outside of the size of the <svg> element.
1890
1891         When drawing an oversized pattern into its tile image, scale the content down to fit. When drawing
1892         the tile image to the screen, scale it back up to fit the expected area. This will cause pixelation
1893         when patterns are over the 4k limit.
1894
1895         Tests: svg/custom/transformed-pattern-clamp-svg-root.svg, svg/custom/oversized-pattern-scale.svg
1896
1897         * rendering/svg/RenderSVGResourceClipper.cpp:
1898         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1899         * rendering/svg/RenderSVGResourceGradient.cpp:
1900         (WebCore::createMaskAndSwapContextForTextGradient):
1901         (WebCore::clipToTextMask):
1902         * rendering/svg/RenderSVGResourceMasker.cpp:
1903         (WebCore::RenderSVGResourceMasker::applyResource):
1904         * rendering/svg/RenderSVGResourcePattern.cpp:
1905         (WebCore::RenderSVGResourcePattern::applyResource):
1906         (WebCore::RenderSVGResourcePattern::createTileImage):
1907         * rendering/svg/RenderSVGResourcePattern.h:
1908         * rendering/svg/SVGImageBufferTools.cpp:
1909         (WebCore::SVGImageBufferTools::clampedAbsoluteTargetRect):
1910         * rendering/svg/SVGImageBufferTools.h:
1911
1912 2011-09-27  Dan Bernstein  <mitz@apple.com>
1913
1914         <rdar://problem/10098679> Assertion failure in RenderLayer::paintPaginatedChildLayer()
1915
1916         Reviewed by Simon Fraser.
1917
1918         Test: fast/dynamic/layer-no-longer-paginated.html
1919
1920         FrameView::layout() calls adjustViewSize() before calling RenderLayer::updateLayerPositions().
1921         The former may trigger painting with a layer tree that is not entirely up-to-date. Specifically,
1922         the isPaginated() state of a layer may be incorrect, leading to the assertion in this bug. Instead
1923         of asserting, return early and count on the upcoming updateLayerPositions() to repaint as needed.
1924
1925         * rendering/RenderLayer.cpp:
1926         (WebCore::RenderLayer::paintPaginatedChildLayer): Replaced the assertion with an early return.
1927
1928 2011-09-27  Ojan Vafai  <ojan@chromium.org>
1929
1930         offsetTop/offsetLeft return the wrong values for horizontal-bt/vertical-rl writing modes
1931         https://bugs.webkit.org/show_bug.cgi?id=68304
1932
1933         Reviewed by David Hyatt.
1934
1935         When grabbing the x/y values of the RenderBox, we need to take writing mode
1936         flipping into account.
1937
1938         Test: fast/dom/offset-position-writing-modes.html
1939
1940         * rendering/RenderBox.cpp:
1941         (WebCore::RenderBox::locationIncludingFlipping):
1942         * rendering/RenderBox.h:
1943         (WebCore::RenderBox::yFlippedForWritingMode):
1944         (WebCore::RenderBox::xFlippedForWritingMode):
1945         * rendering/RenderBoxModelObject.cpp:
1946         (WebCore::RenderBoxModelObject::offsetLeft):
1947         (WebCore::RenderBoxModelObject::offsetTop):
1948
1949 2011-09-27  Tim Horton  <timothy_horton@apple.com>
1950
1951         Rapidly refreshing a feMorphology[erode] with r=0 can sometimes cause display corruption
1952         https://bugs.webkit.org/show_bug.cgi?id=68816
1953         <rdar://problem/10186468>
1954
1955         Reviewed by Simon Fraser.
1956
1957         If a filter returns without writing into its result buffer, make sure to return an cleared buffer.
1958
1959         Test: svg/filters/feMorphology-zero-radius.svg
1960
1961         * platform/graphics/filters/FEMorphology.cpp:
1962         (WebCore::FEMorphology::apply):
1963         * platform/graphics/filters/FETurbulence.cpp:
1964         (WebCore::FETurbulence::apply):
1965
1966 2011-09-27  Ryosuke Niwa  <rniwa@webkit.org>
1967
1968         CompositeEditCommand::prune should remove subtree at once
1969         https://bugs.webkit.org/show_bug.cgi?id=68866
1970
1971         Reviewed by Darin Adler.
1972
1973         Extracted the logic to find the highest ancestor to remove as highestNodeToRemoveInPruning from prune.
1974         This reduces the number of node removals from O(n) to O(1) where n is the depth of the tree.
1975
1976         * editing/CompositeEditCommand.cpp:
1977         (WebCore::hasARenderedDescendant): Takes excludedNode in addition to node. excludedNode is used to ignore
1978         the child node from which we climbed up the tree in highestNodeToRemoveInPruning.
1979         (WebCore::highestNodeToRemoveInPruning): Extracted from prune.
1980         (WebCore::CompositeEditCommand::prune):
1981         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
1982
1983 2011-09-27  David Hyatt  <hyatt@apple.com>
1984
1985         https://bugs.webkit.org/show_bug.cgi?id=68922
1986
1987         Paginated floats should not grow the height of a block when they don't end
1988         up being tied to a line. Floats encountered in skipLeadingWhitespace that
1989         paginate can't immediately grow the height of the block, since there may not
1990         end up being any actual line content. We only want to push the height of the
1991         block down if we have actual line content that we want to keep with the
1992         float.
1993         
1994         Make positionNewFloatOnLine check if the line is empty or not, and if it is,
1995         it just puts the desired pagination strut into LineInfo. If and when actual
1996         line content is encountered and setEmpty becomes false, we'll grow the block
1997         height then.
1998         
1999         Reviewed by Dan Bernstein.
2000
2001         Added fast/multicol/float-paginate-empty-lines.html and
2002         fast/regions/webkit-flow-double-pagination-float-push.html.
2003
2004         * rendering/RenderBlock.h:
2005         * rendering/RenderBlockLineLayout.cpp:
2006         (WebCore::LineWidth::LineWidth):
2007         (WebCore::LineWidth::fitsOnLine):
2008         (WebCore::LineWidth::currentWidth):
2009         (WebCore::LineWidth::uncommittedWidth):
2010         (WebCore::LineWidth::committedWidth):
2011         (WebCore::LineWidth::availableWidth):
2012         (WebCore::LineWidth::addUncommittedWidth):
2013         (WebCore::LineWidth::commit):
2014         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
2015         (WebCore::LineWidth::updateAvailableWidth):
2016         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2017         (WebCore::LineWidth::applyOverhang):
2018         (WebCore::LineWidth::fitBelowFloats):
2019         (WebCore::LineInfo::LineInfo):
2020         (WebCore::LineInfo::floatPaginationStrut):
2021         (WebCore::LineInfo::setEmpty):
2022         (WebCore::LineInfo::setFloatPaginationStrut):
2023         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
2024         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
2025         (WebCore::RenderBlock::positionNewFloatOnLine):
2026
2027 2011-09-27  Dean Jackson  <dino@apple.com>
2028
2029         Add 'filter' value to RenderStyle
2030         https://bugs.webkit.org/show_bug.cgi?id=68471
2031
2032         Reviewed by Simon Fraser.
2033
2034         Add a filter property to RenderStyle when ENABLE(CSS_FILTERS)
2035         is turned on. Similar to -webkit-transform, -webkit-filter is a
2036         list of FilterOperations, each identifying what type of operation
2037         it is. This change simply adds the basic objects, it does not
2038         parse the property to generate the list.
2039
2040         * CMakeLists.txt:
2041         * GNUmakefile.list.am:
2042         * WebCore.gypi:
2043         * WebCore.pro:
2044         * WebCore.vcproj/WebCore.vcproj:
2045         * WebCore.xcodeproj/project.pbxproj:
2046         * platform/graphics/filters/FilterOperation.h: Added.
2047         (WebCore::FilterOperation::~FilterOperation):
2048         (WebCore::FilterOperation::operator!=):
2049         (WebCore::FilterOperation::getOperationType):
2050         (WebCore::FilterOperation::isSameType):
2051         (WebCore::FilterOperation::FilterOperation):
2052         (WebCore::ReferenceFilterOperation::create):
2053         (WebCore::ReferenceFilterOperation::reference):
2054         (WebCore::ReferenceFilterOperation::operator==):
2055         (WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
2056         (WebCore::BasicColorMatrixFilterOperation::create):
2057         (WebCore::BasicColorMatrixFilterOperation::amount):
2058         (WebCore::BasicColorMatrixFilterOperation::operator==):
2059         (WebCore::BasicColorMatrixFilterOperation::BasicColorMatrixFilterOperation):
2060         (WebCore::BasicComponentTransferFilterOperation::create):
2061         (WebCore::BasicComponentTransferFilterOperation::amount):
2062         (WebCore::BasicComponentTransferFilterOperation::operator==):
2063         (WebCore::BasicComponentTransferFilterOperation::BasicComponentTransferFilterOperation):
2064         (WebCore::GammaFilterOperation::create):
2065         (WebCore::GammaFilterOperation::amplitude):
2066         (WebCore::GammaFilterOperation::exponent):
2067         (WebCore::GammaFilterOperation::offset):
2068         (WebCore::GammaFilterOperation::operator==):
2069         (WebCore::GammaFilterOperation::GammaFilterOperation):
2070         (WebCore::BlurFilterOperation::create):
2071         (WebCore::BlurFilterOperation::stdDeviationX):
2072         (WebCore::BlurFilterOperation::stdDeviationY):
2073         (WebCore::BlurFilterOperation::operator==):
2074         (WebCore::BlurFilterOperation::BlurFilterOperation):
2075         (WebCore::SharpenFilterOperation::create):
2076         (WebCore::SharpenFilterOperation::radius):
2077         (WebCore::SharpenFilterOperation::threshold):
2078         (WebCore::SharpenFilterOperation::amount):
2079         (WebCore::SharpenFilterOperation::operator==):
2080         (WebCore::SharpenFilterOperation::SharpenFilterOperation):
2081         (WebCore::DropShadowFilterOperation::create):
2082         (WebCore::DropShadowFilterOperation::shadow):
2083         (WebCore::DropShadowFilterOperation::operator==):
2084         (WebCore::DropShadowFilterOperation::DropShadowFilterOperation):
2085         * platform/graphics/filters/FilterOperations.cpp: Added.
2086         (WebCore::FilterOperations::FilterOperations):
2087         (WebCore::FilterOperations::operator==):
2088         * platform/graphics/filters/FilterOperations.h: Added.
2089         (WebCore::FilterOperations::operator!=):
2090         (WebCore::FilterOperations::clear):
2091         (WebCore::FilterOperations::operations):
2092         (WebCore::FilterOperations::size):
2093         (WebCore::FilterOperations::at):
2094         * rendering/style/RenderStyle.cpp:
2095         (WebCore::RenderStyle::RenderStyle):
2096         * rendering/style/RenderStyle.h:
2097         (WebCore::InheritedFlags::filter):
2098         (WebCore::InheritedFlags::hasFilter):
2099         (WebCore::InheritedFlags::setFilter):
2100         (WebCore::InheritedFlags::initialFilter):
2101         * rendering/style/StyleAllInOne.cpp: Added include of new StyleFilterData.
2102         * rendering/style/StyleFilterData.cpp: Added.
2103         (WebCore::StyleFilterData::StyleFilterData):
2104         (WebCore::StyleFilterData::operator==):
2105         * rendering/style/StyleFilterData.h: Added.
2106         (WebCore::StyleFilterData::create):
2107         (WebCore::StyleFilterData::copy):
2108         (WebCore::StyleFilterData::operator!=):
2109         * rendering/style/StyleRareNonInheritedData.cpp:
2110         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2111         (WebCore::StyleRareNonInheritedData::operator==):
2112         * rendering/style/StyleRareNonInheritedData.h: New filter DataRef.
2113
2114 2011-09-27  James Robinson  <jamesr@chromium.org>
2115
2116         [chromium] LayerRenderChromium asserts about leaking textures.
2117         https://bugs.webkit.org/show_bug.cgi?id=68190
2118
2119         Reviewed by Kenneth Russell.
2120
2121         This introduces an interface TextureAllocator that the TextureManager uses to allocate/deallocate textures.
2122         This means that TextureManager does not need to depend directly on GraphicsContext3D, other than for the format
2123         enum type, making it more testable.  It also allows us to track the allocations by subclassing TextureAllocator
2124         to make sure we aren't leaking any textures.
2125
2126         * WebCore.gypi:
2127         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2128         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
2129         * platform/graphics/chromium/Canvas2DLayerChromium.h:
2130         * platform/graphics/chromium/ImageLayerChromium.cpp:
2131         (WebCore::ImageLayerTextureUpdater::updateTextureRect):
2132         * platform/graphics/chromium/LayerChromium.h:
2133         (WebCore::LayerChromium::updateCompositorResources):
2134         * platform/graphics/chromium/LayerRendererChromium.cpp:
2135         (WebCore::LayerRendererChromium::LayerRendererChromium):
2136         (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures):
2137         (WebCore::LayerRendererChromium::drawLayers):
2138         (WebCore::LayerRendererChromium::useRenderSurface):
2139         (WebCore::LayerRendererChromium::initializeSharedObjects):
2140         (WebCore::LayerRendererChromium::cleanupSharedObjects):
2141         * platform/graphics/chromium/LayerRendererChromium.h:
2142         (WebCore::LayerRendererChromium::renderSurfaceTextureAllocator):
2143         (WebCore::LayerRendererChromium::contentsTextureAllocator):
2144         * platform/graphics/chromium/LayerTextureUpdater.h:
2145         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
2146         (WebCore::LayerTextureUpdaterBitmap::updateTextureRect):
2147         (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
2148         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
2149         * platform/graphics/chromium/ManagedTexture.cpp:
2150         (WebCore::ManagedTexture::bindTexture):
2151         (WebCore::ManagedTexture::framebufferTexture2D):
2152         * platform/graphics/chromium/ManagedTexture.h:
2153         * platform/graphics/chromium/TextureManager.cpp:
2154         (WebCore::TextureManager::memoryUseBytes):
2155         (WebCore::TextureManager::deleteEvictedTextures):
2156         (WebCore::TextureManager::evictAndDeleteAllTextures):
2157         (WebCore::TextureManager::removeTexture):
2158         (WebCore::TextureManager::allocateTexture):
2159         (WebCore::TextureManager::requestTexture):
2160         * platform/graphics/chromium/TextureManager.h:
2161         (WebCore::TextureAllocator::~TextureAllocator):
2162         * platform/graphics/chromium/TiledLayerChromium.cpp:
2163         (WebCore::TiledLayerChromium::updateCompositorResources):
2164         * platform/graphics/chromium/TiledLayerChromium.h:
2165         * platform/graphics/chromium/TrackingTextureAllocator.cpp: Added.
2166         (WebCore::TrackingTextureAllocator::TrackingTextureAllocator):
2167         (WebCore::TrackingTextureAllocator::~TrackingTextureAllocator):
2168         (WebCore::TrackingTextureAllocator::createTexture):
2169         (WebCore::TrackingTextureAllocator::deleteTexture):
2170         * platform/graphics/chromium/TrackingTextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/ManagedTexture.h.
2171         (WebCore::TrackingTextureAllocator::create):
2172         (WebCore::TrackingTextureAllocator::currentMemoryUseBytes):
2173         * platform/graphics/chromium/VideoLayerChromium.cpp:
2174         (WebCore::VideoLayerChromium::updateCompositorResources):
2175         (WebCore::VideoLayerChromium::updateTexture):
2176         * platform/graphics/chromium/VideoLayerChromium.h:
2177         * platform/graphics/chromium/WebGLLayerChromium.cpp:
2178         (WebCore::WebGLLayerChromium::updateCompositorResources):
2179         * platform/graphics/chromium/WebGLLayerChromium.h:
2180         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
2181         (WebCore::CCHeadsUpDisplay::draw):
2182         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2183         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
2184         (WebCore::CCLayerTreeHost::deleteContentsTexturesOnCCThread):
2185         (WebCore::CCLayerTreeHost::commitToOnCCThread):
2186         (WebCore::CCLayerTreeHost::didRecreateGraphicsContext):
2187         (WebCore::CCLayerTreeHost::updateCompositorResources):
2188         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2189         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2190         (WebCore::CCLayerTreeHostImpl::contentsTextureAllocator):
2191         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
2192         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2193         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2194         (WebCore::CCRenderSurface::drawSurface):
2195         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2196         (WebCore::CCSingleThreadProxy::setNeedsCommit):
2197         (WebCore::CCSingleThreadProxy::stop):
2198         (WebCore::CCSingleThreadProxy::recreateContextIfNeeded):
2199         (WebCore::CCSingleThreadProxy::commitIfNeeded):
2200         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2201         (WebCore::CCThreadProxy::commitOnCCThread):
2202         (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread):
2203
2204 2011-06-28  Robert Hogan  <robert@webkit.org>
2205
2206         Reviewed by David Hyatt.
2207
2208         Replaced elements squeezed when width is specified as percentage inside a table with Auto layout
2209         https://bugs.webkit.org/show_bug.cgi?id=29447
2210
2211         If inserting a 'replaced' element (e.g. image, plugin) in a table cell that is not descendant from
2212         a block with fixed layout then do not squeeze the element, let it use its intrinsic width and height.
2213
2214         Test: fast/replaced/table-percent-width.html
2215
2216         * rendering/RenderBox.cpp:
2217         (WebCore::avoidSqueezingWidth):
2218         (WebCore::avoidSqueezingHeight):
2219         (WebCore::RenderBox::containingBlockReplacedLogicalWidthForContent):
2220         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
2221         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2222         * rendering/RenderBox.h:
2223
2224 2011-09-27  Simon Fraser  <simon.fraser@apple.com>
2225
2226         https://bugs.webkit.org/show_bug.cgi?id=67858
2227
2228         Roll r96070 back in now that the crash has been fixed in r96130.
2229
2230         Reviewed by Darin Adler.
2231         
2232         When non-overlay scrollbars are hidden on a composited iframe, nothing invalidated
2233         the scrollbar areas or the scroll corner, so the scrollbars appear to remain.
2234         
2235         Fix by invalidating the scrollbars and scroll corner when they are removed. Invalidation
2236         on scrollbar creation appears to happen via updating the scrollbar style.
2237
2238         Tested by compositing/iframes/repaint-after-losing-scrollbars.html which no longer shows
2239         stale scrollbars when run manually, even though the green squares are missing from the
2240         pixel result (bug 67878).
2241
2242         * page/FrameView.cpp:
2243         (WebCore::FrameView::updateScrollCorner): Pass the corner rect into invalidateScrollCorner().
2244         * platform/ScrollView.cpp:
2245         (WebCore::ScrollView::setHasHorizontalScrollbar): Invalidate the scrollbar area if hiding it.
2246         (WebCore::ScrollView::setHasVerticalScrollbar): Ditto.
2247         (WebCore::ScrollView::updateScrollbars): In the case where both scrollbars are going away,
2248         compute the scroll corner rect while we still have scrollbars, and then invalidate it
2249         explicitly. (updateScrollCorner() doesn't, because it doesn't have access to the old corner
2250         rect.)
2251         * platform/ScrollableArea.cpp:
2252         (WebCore::ScrollableArea::invalidateScrollCorner): Pass the rect in, because we can't
2253         compute it in the case where the scrollbars are going away.
2254         * platform/ScrollableArea.h: Pass in a rect to invalidateScrollCorner(), which matches
2255         invalidateScrollbar().
2256         * rendering/RenderLayerCompositor.cpp:
2257         (WebCore::RenderLayerCompositor::destroyRootLayer): Pass the corner rect into invalidateScrollCorner().
2258         * rendering/RenderScrollbarPart.cpp: Ditto.
2259         (WebCore::RenderScrollbarPart::imageChanged): Ditto.
2260
2261 2011-09-27  Mihai Parparita  <mihaip@chromium.org>
2262
2263         Fix Chromium Mac build after r96130.
2264
2265         * page/FrameView.cpp:
2266         (WebCore::FrameView::layerForOverhangAreas):
2267
2268 2011-09-27  Kaustubh Atrawalkar  <kaustubh@motorola.com>
2269
2270         Autofocus on readonly inputs does not focus the element.
2271         https://bugs.webkit.org/show_bug.cgi?id=24092
2272
2273         Reviewed by Ryosuke Niwa.
2274
2275         Readonly input elements should be autofocusable. Removed the check.
2276
2277         Tests: fast/forms/autofocus-readonly-attribute.html
2278
2279         * html/HTMLFormControlElement.cpp:
2280         (WebCore::shouldAutofocus):
2281
2282 2011-09-27  Simon Fraser  <simon.fraser@apple.com>
2283
2284         Clean up how FrameView accesses the RenderView
2285         https://bugs.webkit.org/show_bug.cgi?id=68914
2286
2287         Reviewed by Sam Weinig.
2288
2289         Clean up how FrameView accesses the content renderer of its
2290         frame. Previously, this was done in several different ways,
2291         only some of which did null-checking.
2292         
2293         Use an inline method to avoid having to expose Frame
2294         in the header.
2295         
2296         Standardize the terminology to use 'root' for this RenderView.
2297
2298         * page/FrameView.cpp:
2299         (WebCore::rootRenderer):
2300         (WebCore::FrameView::setFrameRect):
2301         (WebCore::FrameView::adjustViewSize):
2302         (WebCore::FrameView::updateCompositingLayers):
2303         (WebCore::FrameView::clearBackingStores):
2304         (WebCore::FrameView::restoreBackingStores):
2305         (WebCore::FrameView::layerForHorizontalScrollbar):
2306         (WebCore::FrameView::layerForVerticalScrollbar):
2307         (WebCore::FrameView::layerForScrollCorner):
2308         (WebCore::FrameView::layerForOverhangAreas):
2309         (WebCore::FrameView::syncCompositingStateForThisFrame):
2310         (WebCore::FrameView::hasCompositedContent):
2311         (WebCore::FrameView::enterCompositingMode):
2312         (WebCore::FrameView::isSoftwareRenderable):
2313         (WebCore::FrameView::didMoveOnscreen):
2314         (WebCore::FrameView::willMoveOffscreen):
2315         (WebCore::FrameView::layout):
2316         (WebCore::FrameView::embeddedContentBox):
2317         (WebCore::FrameView::contentsInCompositedLayer):
2318         (WebCore::FrameView::scrollContentsFastPath):
2319         (WebCore::FrameView::scrollContentsSlowPath):
2320         (WebCore::FrameView::maintainScrollPositionAtAnchor):
2321         (WebCore::FrameView::scrollPositionChanged):
2322         (WebCore::FrameView::repaintFixedElementsAfterScrolling):
2323         (WebCore::FrameView::visibleContentsResized):
2324         (WebCore::FrameView::scheduleRelayoutOfSubtree):
2325         (WebCore::FrameView::needsLayout):
2326         (WebCore::FrameView::setNeedsLayout):
2327         (WebCore::FrameView::performPostLayoutTasks):
2328         (WebCore::FrameView::updateControlTints):
2329         (WebCore::FrameView::paintContents):
2330         (WebCore::FrameView::forceLayoutForPagination):
2331         (WebCore::FrameView::adjustPageHeightDeprecated):
2332         (WebCore::FrameView::isVerticalDocument):
2333         (WebCore::FrameView::isFlippedDocument):
2334
2335 2011-09-27  Dominic Mazzoni  <dmazzoni@google.com>
2336
2337         AXObjectCache cleared unnecessarily when non-top Document is detached.
2338         https://bugs.webkit.org/show_bug.cgi?id=68636
2339
2340         Reviewed by Chris Fleizach.
2341
2342         Test: accessibility/deleting-iframe-destroys-axcache.html
2343
2344         * dom/Document.cpp:
2345         (WebCore::Document::attach):
2346         (WebCore::Document::detach):
2347
2348 2011-09-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2349
2350         Unreviewed, rolling out r96108, r96111, r96113, and r96116.
2351         http://trac.webkit.org/changeset/96108
2352         http://trac.webkit.org/changeset/96111
2353         http://trac.webkit.org/changeset/96113
2354         http://trac.webkit.org/changeset/96116
2355         https://bugs.webkit.org/show_bug.cgi?id=68913
2356
2357         Wait for working Qt5 (Requested by ossy on #webkit).
2358
2359         * WebCore.pri:
2360         * platform/graphics/qt/GraphicsLayerQt.cpp:
2361
2362 2011-09-27  Csaba Osztrogonác  <ossy@webkit.org>
2363
2364         Fix ENABLE(SQL_DATABASE)=0 build after r95919
2365         https://bugs.webkit.org/show_bug.cgi?id=68902
2366
2367         r95919 enabled OFFLINE_WEB_APPLICATIONS by default and
2368         it needs SQLite stuff even if ENABLE_SQL_DATABASE=0.
2369
2370         Reviewed by Adam Barth.
2371
2372         * platform/sql/SQLiteAuthorizer.cpp:
2373         * platform/sql/SQLiteDatabase.cpp:
2374         * platform/sql/SQLiteFileSystem.cpp:
2375         * platform/sql/SQLiteStatement.cpp:
2376         * platform/sql/SQLiteTransaction.cpp:
2377         * storage/DatabaseAuthorizer.cpp:
2378
2379 2011-09-27  Julien Chaffraix  <jchaffraix@webkit.org>
2380
2381         Crash because CSSPrimitiveValue::computeLengthDouble assumes fontMetrics are available
2382         https://bugs.webkit.org/show_bug.cgi?id=66291
2383
2384         Reviewed by Darin Adler.
2385
2386         Test: fast/canvas/crash-set-font.html
2387
2388         This is Yet Another Missing updateFont (similar to bug 57756 and likely others). Here the issue is that
2389         applying one of the font properties could mutate the parent style's font if m_parentStyle == m_style.
2390         We would then query the newly created font when applying CSSPropertyFontSize, which has no font fallback
2391         list as Font::update was never called.
2392
2393         The right fix would be to refactor of how we handle fonts to avoid such manual updates (see bug 62390).
2394         Until this happens, it is better not to crash.
2395
2396         * css/CSSStyleSelector.cpp:
2397         (WebCore::CSSStyleSelector::applyProperty): Added updateFont() here as the fonts could have been
2398         mutated by the previous property change. Also added a comment explaining why it is safe to do it
2399         this way.
2400
2401 2011-09-27  No'am Rosenthal  <noam.rosenthal@nokia.com>
2402
2403         [Texmap] Code cleanup: remove unused boundingRect/visibleRect calculations
2404         https://bugs.webkit.org/show_bug.cgi?id=68897
2405
2406         Reviewed by Andreas Kling.
2407
2408         No new functionality so no new tests.
2409
2410         * platform/graphics/texmap/TextureMapperNode.cpp:
2411         (WebCore::TextureMapperNode::computeAllTransforms):
2412         (WebCore::TextureMapperNode::computeTiles):
2413         (WebCore::TextureMapperNode::syncCompositingState):
2414         * platform/graphics/texmap/TextureMapperNode.h:
2415
2416 2011-09-27  No'am Rosenthal  <noam.rosenthal@nokia.com>
2417
2418         [Texmap][Qt] Refactor texture-upload to allow direct chunk update
2419         https://bugs.webkit.org/show_bug.cgi?id=68808
2420
2421         Add a function to BitmapTexture for direct pixel updates.
2422         Modify BitmapTextureGL::endPaint to use that function. Since the BGRA
2423         to RGBA swizzling is done inside that function, there's no need for the 
2424         RGBA32PremultipliedBuffer class to contain such function. Also,
2425         RGBA32PremultipliedBuffer was renamed to BGRA32PremultipliedBuffer, correcting
2426         an old mistake.
2427
2428         Reviewed by Andreas Kling.
2429
2430         No new tests. Existing tests in LayoutTests/compositing test this.
2431
2432         * platform/graphics/opengl/TextureMapperGL.cpp:
2433         (WebCore::BitmapTextureGL::beginPaint):
2434         (WebCore::BitmapTextureGL::endPaint):
2435         (WebCore::swizzleBGRAToRGBA):
2436         (WebCore::BitmapTextureGL::updateContents):
2437         * platform/graphics/opengl/TextureMapperGL.h:
2438         (WebCore::BGRA32PremultimpliedBuffer::~BGRA32PremultimpliedBuffer):
2439         * platform/graphics/qt/TextureMapperQt.cpp:
2440         (WebCore::BitmapTextureQt::updateContents):
2441         (WebCore::BGRA32PremultimpliedBufferQt::data):
2442         (WebCore::BGRA32PremultimpliedBuffer::create):
2443         * platform/graphics/qt/TextureMapperQt.h:
2444         * platform/graphics/texmap/TextureMapper.h:
2445
2446 2011-09-23  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2447
2448         [Qt] Fix build against Qt5 after refactor of widgets out of QtGUi
2449
2450         QWidget and friends now live in the QtWidgets library. We update
2451         includes in implementation files and private headers to us the
2452         non-module-prefixed path, and leave the lookup for the include
2453         path. For public headers we have to ifdef the includes as the
2454         user might now have the modules we need in his QT config.
2455
2456         Finally, QSGCanvas is no longer a QWidget but a QWindow, so we
2457         have to update our code and use windowHandle() for setting the
2458         parent relationships.
2459
2460         https://bugs.webkit.org/show_bug.cgi?id=68687
2461
2462         Reviewed by Andreas Kling.
2463
2464         * WebCore.pri:
2465         * platform/graphics/qt/GraphicsLayerQt.cpp:
2466
2467 2011-09-27  Pavel Feldman  <pfeldman@google.com>
2468
2469         Web Inspector: split DOM.attributesUpdated into attributeModified and attributeRemoved.
2470         Send attribute name and value within the event.
2471         https://bugs.webkit.org/show_bug.cgi?id=68613
2472
2473         Reviewed by Yury Semikhatsky.
2474
2475         * dom/Element.cpp:
2476         (WebCore::Element::setAttribute):
2477         (WebCore::Element::removeAttribute):
2478         * inspector/Inspector.draft-01.json:
2479         * inspector/Inspector.json:
2480         * inspector/InspectorDOMAgent.cpp:
2481         (WebCore::InspectorDOMAgent::didModifyDOMAttr):
2482         (WebCore::InspectorDOMAgent::didRemoveDOMAttr):
2483         * inspector/InspectorDOMAgent.h:
2484         * inspector/InspectorInstrumentation.cpp:
2485         (WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
2486         (WebCore::InspectorInstrumentation::didRemoveDOMAttrImpl):
2487         * inspector/InspectorInstrumentation.h:
2488         (WebCore::InspectorInstrumentation::didModifyDOMAttr):
2489         (WebCore::InspectorInstrumentation::didRemoveDOMAttr):
2490         * inspector/front-end/DOMAgent.js:
2491         (WebInspector.DOMNode.prototype._addAttribute):
2492         (WebInspector.DOMNode.prototype._setAttribute):
2493         (WebInspector.DOMNode.prototype._removeAttribute):
2494         (WebInspector.DOMAgent.prototype._attributeModified):
2495         (WebInspector.DOMAgent.prototype._attributeRemoved):
2496         (WebInspector.DOMAgent.prototype._inlineStyleInvalidated):
2497         (WebInspector.DOMAgent.prototype._loadNodeAttributes):
2498         (WebInspector.DOMDispatcher.prototype.attributeModified):
2499         (WebInspector.DOMDispatcher.prototype.attributeRemoved):
2500         * inspector/front-end/ElementsPanel.js:
2501         (WebInspector.ElementsPanel):
2502         (WebInspector.ElementsPanel.prototype._attributesUpdated):
2503         * inspector/front-end/MetricsSidebarPane.js:
2504         (WebInspector.MetricsSidebarPane):
2505         (WebInspector.MetricsSidebarPane.prototype._attributesUpdated):
2506         * inspector/front-end/StylesSidebarPane.js:
2507         (WebInspector.StylesSidebarPane):
2508         (WebInspector.StylesSidebarPane.prototype._attributesModified):
2509         (WebInspector.StylesSidebarPane.prototype._attributesRemoved):
2510         (WebInspector.StylesSidebarPane.prototype._styleInvalidated):
2511         (WebInspector.StylePropertyTreeElement.prototype.event):
2512         (WebInspector.StylePropertyTreeElement.prototype):
2513         * inspector/validate-protocol-compatibility:
2514
2515 2011-09-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2516
2517         Unreviewed, rolling out r96070 and r96075.
2518         http://trac.webkit.org/changeset/96070
2519         http://trac.webkit.org/changeset/96075
2520         https://bugs.webkit.org/show_bug.cgi?id=68893
2521
2522         WK2 tests started crashing after r96070 for SL and Qt
2523         (Requested by torarne on #webkit).
2524
2525         * page/FrameView.cpp:
2526         (WebCore::FrameView::updateScrollCorner):
2527         * platform/ScrollView.cpp:
2528         (WebCore::ScrollView::setHasHorizontalScrollbar):
2529         (WebCore::ScrollView::setHasVerticalScrollbar):
2530         (WebCore::ScrollView::updateScrollbars):
2531         * platform/ScrollableArea.cpp:
2532         (WebCore::ScrollableArea::invalidateScrollCorner):
2533         * platform/ScrollableArea.h:
2534         * rendering/RenderLayerCompositor.cpp:
2535         (WebCore::RenderLayerCompositor::destroyRootLayer):
2536         * rendering/RenderScrollbarPart.cpp:
2537         (WebCore::RenderScrollbarPart::imageChanged):
2538
2539 2011-09-27  Andrey Kosyakov  <caseq@chromium.org>
2540
2541         Web Inspector: JS exception upon clicking on "Word Wrap" checkbox in Settings screen
2542         https://bugs.webkit.org/show_bug.cgi?id=68888
2543
2544         Reviewed by Pavel Feldman.
2545
2546         * inspector/front-end/ElementsPanel.js:
2547         (WebInspector.ElementsPanel.prototype._domWordWrapSettingChanged):
2548
2549 2011-09-21  Pavel Podivilov  <podivilov@chromium.org>
2550
2551         Web Inspector: migrate RawSourceCode clients to SourceMapping class.
2552         https://bugs.webkit.org/show_bug.cgi?id=68524
2553
2554         Clients should use uiSourceCode(), rawLocationToUILocation(), uiLocationToRawLocation() methods of SourceMapping class.
2555         Initially, RawSourceCode may not have associated SourceMapping, so it is natural to extract this methods and associated state to a separate class.
2556
2557         Reviewed by Yury Semikhatsky.
2558
2559         * inspector/front-end/BreakpointManager.js:
2560         (WebInspector.BreakpointManager.prototype._materializeBreakpoint):
2561         (WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged):
2562         * inspector/front-end/DebuggerPresentationModel.js:
2563         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor):
2564         (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation):
2565         (WebInspector.DebuggerPresentationModel.prototype._addScript):
2566         (WebInspector.DebuggerPresentationModel.prototype._updateSourceMapping):
2567         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
2568         (WebInspector.DebuggerPresentationModel.prototype._restoreConsoleMessages):
2569         (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded):
2570         (WebInspector.DebuggerPresentationModel.prototype._createPresentationMessage):
2571         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
2572         (WebInspector.PresentationCallFrame.prototype.get url):
2573         (WebInspector.PresentationCallFrame.prototype.sourceLine.sourceMappingUpdated):
2574         (WebInspector.PresentationCallFrame.prototype.sourceLine):
2575         (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent):
2576         (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent):
2577         * inspector/front-end/SourceFile.js:
2578         (WebInspector.RawSourceCode.prototype.get sourceMapping):
2579
2580 2011-09-27  Vineet Chaudhary  <vineet.chaudhary@motorola.com>
2581
2582         wrap attribute of textarea element cannot be accessed by JavaScript.
2583         https://bugs.webkit.org/show_bug.cgi?id=68592
2584
2585         Reviewed by Kent Tamura.
2586
2587         Added JS interface for wrap attribute to HTMLTextAreaElement.idl.
2588
2589         Test: fast/forms/textarea-wrap-attribute.html
2590
2591         * html/HTMLTextAreaElement.idl:
2592
2593 2011-09-27  Xan Lopez  <xlopez@igalia.com>
2594
2595         [GTK] Add compatibility methods for DOM bindings
2596         https://bugs.webkit.org/show_bug.cgi?id=68884
2597
2598         Reviewed by Philippe Normand.
2599
2600         Add compatibility methods for our DOM bindings.
2601
2602         * bindings/gobject/WebKitDOMCustom.cpp:
2603         (webkit_dom_blob_slice): alias to the new method name.
2604         (webkit_dom_html_form_element_dispatch_form_change): this was
2605         removed from WebCore, so just print a warning about it.
2606         (webkit_dom_html_form_element_dispatch_form_input): ditto.
2607         * bindings/gobject/WebKitDOMCustom.h:
2608
2609 2011-09-27  Ryosuke Niwa  <rniwa@webkit.org>
2610
2611         Encapsulate m_firstNodeInserted and m_lastLeafInserted in node insertion logic
2612         https://bugs.webkit.org/show_bug.cgi?id=68875
2613
2614         Reviewed by Kent Tamura.
2615
2616         Added InsertedNode class inside ReplaceSelection to encapsulate m_firstNodeInserted and m_lastLeafInserted.
2617         Deployed it in removeRedundantStylesAndKeepStyleSpanInline, doApply, and insertAsListItems of ReplaceSelectionCommand.
2618
2619         * editing/DeleteSelectionCommand.cpp:
2620         (WebCore::DeleteSelectionCommand::removeNode):
2621         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2622         * editing/ReplaceSelectionCommand.cpp:
2623         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
2624         (WebCore::ReplaceSelectionCommand::doApply):
2625         (WebCore::ReplaceSelectionCommand::insertAsListItems):
2626         * editing/ReplaceSelectionCommand.h:
2627         (WebCore::ReplaceSelectionCommand::InsertedNodes::respondToNodeInsertion):
2628         (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNode):
2629         (WebCore::ReplaceSelectionCommand::InsertedNodes::firstNodeInserted):
2630         (WebCore::ReplaceSelectionCommand::InsertedNodes::lastLeafInserted):
2631         (WebCore::ReplaceSelectionCommand::InsertedNodes::pastLastLeaf):
2632         * editing/htmlediting.cpp:
2633         (WebCore::updatePositionForNodeRemoval): Moved from DeleteSelectionCommand.cpp.
2634         * editing/htmlediting.h:
2635
2636 2011-09-27  Arun Patole  <bmf834@motorola.com>
2637
2638         Audio element doesn't emit the 'playing' event every time it starts playing, after it has finished playing.
2639         https://bugs.webkit.org/show_bug.cgi?id=60972
2640
2641         Reviewed by Philippe Normand.
2642
2643         The paused attribute should be set to true and the media element should emit a 'paused' at the end of playback.
2644         WHATWG revision r6562: http://html5.org/tools/web-apps-tracker?from=6561&to=6562
2645
2646         Test: media/media-element-play-after-eos.html
2647
2648         * html/HTMLMediaElement.cpp:
2649         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): set m_paused to true and schedule 'pause' event when playback ended.
2650
2651 2011-09-27  Rakesh KN  <rakesh.kn@motorola.com>
2652
2653         <input> with autofocus doesn't lose focus when it has a certain onblur listener
2654         https://bugs.webkit.org/show_bug.cgi?id=68513
2655
2656         Reviewed by Kent Tamura.
2657
2658         Test: fast/forms/autofocus-focus-only-once.html
2659
2660         These changes make sure that an element is focused only once when autofocus attribute is used.
2661
2662         * html/HTMLFormControlElement.cpp:
2663         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2664         (WebCore::shouldAutofocus):
2665         (WebCore::HTMLFormControlElement::attach):
2666         * html/HTMLFormControlElement.h:
2667         (WebCore::HTMLFormControlElement::hasAutofocused):
2668         (WebCore::HTMLFormControlElement::setAutofocused):
2669
2670 2011-09-26  Kentaro Hara  <haraken@chromium.org>
2671
2672         Implement PopStateEvent.state with SerializedScriptValue and ScriptValue
2673         https://bugs.webkit.org/show_bug.cgi?id=68345
2674
2675         Reviewed by Adam Barth.
2676
2677         Previously, the following test cases fail or crash:
2678
2679         - shouldBe("new PopStateEvent('eventType', { state: object1 }).state", "object1") -> FAIL
2680         - new PopStateEvent('eventType', { state: document }).state -> CRASH in DRT
2681
2682         This is because PopStateEvent.state is implemented not as ScriptValue but as SerializedScriptValue.
2683         However, we cannot simply change the type of PopStateEvent.state to ScriptValue,
2684         since PopStateEvent can be constructed in the context that does not know ScriptValue.
2685         For example, Document.cpp calls PopStateEvent::create() with SerializedScriptValue
2686         popped from HistoryItem, but we cannot deserialize the SerializedScriptValue into
2687         the corresponding ScriptValue here because the deserialization requires ExecState.
2688         In other words, although we want to store PopStateEvent.state by ScriptValue internally,
2689         PopStateEvent still needs to provide an API to construct it with SerializedScriptValue.
2690         With these observations, this patch makes the following changes:
2691
2692         - If PopStateEvent is constructed with ScriptValue, it is stored as ScriptValue internally.
2693         When PopStateEvent.state is called, the ScriptValue is returned.
2694         - If PopStateEvent is constructed with SerializedScriptValue, it is stored as
2695         SerializedScriptValue internally (since we cannot deserialize it into ScriptValue
2696         at this point). When PopStateEvent.state is called, the SerializedScriptValue is
2697         deserialized into the corresponding ScriptValue, and the ScriptValue is returned.
2698
2699         Tests: fast/events/constructors/pop-state-event-constructor.html
2700                fast/events/fire-popstate-event.html
2701
2702         * GNUmakefile.list.am: Added JSPopStateEventCustom.cpp.
2703         * UseJSC.cmake: Ditto.
2704         * WebCore.gypi: Ditto.
2705         * WebCore.pro: Ditto.
2706         * WebCore.xcodeproj/project.pbxproj: Ditto.
2707         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
2708         * bindings/js/JSPopStateEventCustom.cpp:
2709         (WebCore::JSPopStateEvent::state): Custom getter for PopStateEvent.state.
2710         * bindings/v8/custom/V8PopStateEventCustom.cpp:
2711         (WebCore::V8PopStateEvent::stateAccessorGetter): Custom getter for PopStateEvent.state.
2712         * dom/PopStateEvent.cpp:
2713         (WebCore::PopStateEventInit::PopStateEventInit): Added initialization code for PopStateEvent.m_state.
2714         (WebCore::PopStateEvent::PopStateEvent): Ditto.
2715         (WebCore::PopStateEvent::create): Ditto.
2716         (WebCore::PopStateEvent::initPopStateEvent): Ditto.
2717         * dom/PopStateEvent.h:
2718         (WebCore::PopStateEvent::serializedState): Getter.
2719         (WebCore::PopStateEvent::state): Getter.
2720         * dom/PopStateEvent.idl: Change the type of 'stateArg' and 'state' to DOMObject. Added [CustomGetter] to 'state'.
2721
2722 2011-09-09  Simon Fraser  <simon.fraser@apple.com>
2723
2724         Pixel result shows that compositing/iframes/repaint-after-losing-scrollbars.html is failing
2725         https://bugs.webkit.org/show_bug.cgi?id=67858
2726
2727         Reviewed by Darin Adler.
2728         
2729         When non-overlay scrollbars are hidden on a composited iframe, nothing invalidated
2730         the scrollbar areas or the scroll corner, so the scrollbars appear to remain.
2731         
2732         Fix by invalidating the scrollbars and scroll corner when they are removed. Invalidation
2733         on scrollbar creation appears to happen via updating the scrollbar style.
2734
2735         Tested by compositing/iframes/repaint-after-losing-scrollbars.html which no longer shows
2736         stale scrollbars when run manually, even though the green squares are missing from the
2737         pixel result (bug 67878).
2738
2739         * page/FrameView.cpp:
2740         (WebCore::FrameView::updateScrollCorner): Pass the corner rect into invalidateScrollCorner().
2741         * platform/ScrollView.cpp:
2742         (WebCore::ScrollView::setHasHorizontalScrollbar): Invalidate the scrollbar area if hiding it.
2743         (WebCore::ScrollView::setHasVerticalScrollbar): Ditto.
2744         (WebCore::ScrollView::updateScrollbars): In the case where both scrollbars are going away,
2745         compute the scroll corner rect while we still have scrollbars, and then invalidate it
2746         explicitly. (updateScrollCorner() doesn't, because it doesn't have access to the old corner
2747         rect.)
2748         * platform/ScrollableArea.cpp:
2749         (WebCore::ScrollableArea::invalidateScrollCorner): Pass the rect in, because we can't
2750         compute it in the case where the scrollbars are going away.
2751         * platform/ScrollableArea.h: Pass in a rect to invalidateScrollCorner(), which matches
2752         invalidateScrollbar().
2753         * rendering/RenderLayerCompositor.cpp:
2754         (WebCore::RenderLayerCompositor::destroyRootLayer): Pass the corner rect into invalidateScrollCorner().
2755         * rendering/RenderScrollbarPart.cpp: Ditto.
2756         (WebCore::RenderScrollbarPart::imageChanged): Ditto.
2757
2758 2011-09-09  Simon Fraser  <simon.fraser@apple.com>
2759
2760         Translucent scrollbars on composited layers render incorrectly
2761         https://bugs.webkit.org/show_bug.cgi?id=58515
2762
2763         Reviewed by Sam Weinig.
2764         
2765         Scrollbars in composited elements were getting drawn twice,
2766         because r41203 moved the call to paintOverflowControls() out of
2767         RenderLayer::paintLayer(), but forgot to change RenderLayerBacking::paintIntoLayer().
2768
2769         Test: compositing/scrollbar-painting.html
2770
2771         * rendering/RenderLayerBacking.cpp:
2772         (WebCore::RenderLayerBacking::paintIntoLayer):
2773
2774 2011-09-26  Nat Duca  <nduca@chromium.org>
2775
2776         [chromium] Make CCThreadProxy draw
2777         https://bugs.webkit.org/show_bug.cgi?id=67417
2778
2779         Update the CCThreadProxy to correctly implement the CCProxy
2780         interface, do all the right committing and updating steps, and
2781         draw a picture on the screen.
2782
2783         Reviewed by James Robinson.
2784
2785         * platform/graphics/IntRect.h:
2786         * platform/graphics/chromium/LayerRendererChromium.cpp:
2787         (WebCore::LayerRendererChromium::~LayerRendererChromium):
2788         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
2789         (WebCore::CCHeadsUpDisplay::enabled):
2790         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2791         (WebCore::CCLayerImpl::CCLayerImpl):
2792         (WebCore::CCLayerImpl::~CCLayerImpl):
2793         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2794         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2795         (WebCore::CCLayerTreeHost::commitTo):
2796         (WebCore::CCLayerTreeHost::commitComplete):
2797         (WebCore::CCLayerTreeHost::setNeedsRedraw):
2798         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2799         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2800         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
2801         (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl):
2802         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2803         (WebCore::CCSingleThreadProxy::finishAllRendering):
2804         (WebCore::CCSingleThreadProxy::setNeedsCommit):
2805         (WebCore::CCSingleThreadProxy::commitIfNeeded):
2806         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2807         (WebCore::CCThreadProxy::CCThreadProxy):
2808         (WebCore::CCThreadProxy::~CCThreadProxy):
2809         (WebCore::CCThreadProxy::compositeAndReadback):
2810         (WebCore::CCThreadProxy::drawLayersAndReadbackOnCCThread):
2811         (WebCore::CCThreadProxy::finishAllRendering):
2812         (WebCore::CCThreadProxy::isStarted):
2813         (WebCore::CCThreadProxy::setNeedsCommit):
2814         (WebCore::CCThreadProxy::setNeedsCommitAndRedraw):
2815         (WebCore::CCThreadProxy::setNeedsRedraw):
2816         (WebCore::CCThreadProxy::start):
2817         (WebCore::CCThreadProxy::stop):
2818         (WebCore::CCThreadProxy::finishAllRenderingOnCCThread):
2819         (WebCore::CCThreadProxy::createBeginFrameAndCommitTaskOnCCThread):
2820         (WebCore::CCThreadProxy::beginFrameAndCommit):
2821         (WebCore::CCThreadProxy::commitOnCCThread):
2822         (WebCore::CCThreadProxy::scheduleDrawTaskOnCCThread):
2823         (WebCore::CCThreadProxy::drawLayersAndPresentOnCCThread):
2824         (WebCore::CCThreadProxy::drawLayersOnCCThread):
2825         (WebCore::CCThreadProxy::updateSchedulerStateOnCCThread):
2826         * platform/graphics/chromium/cc/CCThreadProxy.h:
2827
2828 2011-09-26  Adam Klein  <adamk@chromium.org>
2829
2830         [MutationObservers] implement MutationRecord
2831         https://bugs.webkit.org/show_bug.cgi?id=68824
2832
2833         Reviewed by Darin Adler.
2834
2835         Implements MutationRecord as specified in the thread at
2836         http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/1622.html,
2837         including some minor naming changes from the original proposal.
2838
2839         This is a small part of the MutationObserver API, see
2840         https://bugs.webkit.org/show_bug.cgi?id=68729 for the metabug covering
2841         this feature.
2842
2843         No new tests as this isn't yet exposed to the platform.
2844
2845         * CMakeLists.txt:
2846         * DerivedSources.cpp:
2847         * DerivedSources.make:
2848         * GNUmakefile.list.am:
2849         * WebCore.gypi:
2850         * WebCore.pro:
2851         * WebCore.vcproj/WebCore.vcproj:
2852         * WebCore.xcodeproj/project.pbxproj:
2853         * dom/MutationRecord.cpp: Added.
2854         (WebCore::MutationRecord::createChildList):
2855         (WebCore::MutationRecord::createAttributes):
2856         (WebCore::MutationRecord::createCharacterData):
2857         (WebCore::MutationRecord::MutationRecord):
2858         (WebCore::MutationRecord::~MutationRecord):
2859         * dom/MutationRecord.h: Added.
2860         (WebCore::MutationRecord::target):
2861         (WebCore::MutationRecord::addedNodes):
2862         (WebCore::MutationRecord::removedNodes):
2863         (WebCore::MutationRecord::previousSibling):
2864         (WebCore::MutationRecord::nextSibling):
2865         (WebCore::MutationRecord::attributeName):
2866         (WebCore::MutationRecord::attributeNamespace):
2867         (WebCore::MutationRecord::oldValue):
2868         (WebCore::MutationRecord::setOldValue):
2869         * dom/MutationRecord.idl: Added.
2870
2871 2011-09-26  Kentaro Hara  <haraken@chromium.org>
2872
2873         Implement a CloseEvent constructor for V8
2874         https://bugs.webkit.org/show_bug.cgi?id=68793
2875
2876         Reviewed by Adam Barth.
2877
2878         Test: fast/events/constructors/close-event-constructor.html
2879
2880         * bindings/v8/OptionsObject.cpp:
2881         (WebCore::OptionsObject::getKey): Just removed an extra space.
2882         (WebCore::OptionsObject::getKeyValue): Returns an unsigned short value corresponding to the given key.
2883         * bindings/v8/OptionsObject.h:
2884         * bindings/v8/custom/V8EventConstructors.cpp: Added the CloseEvent constructor.
2885         * websockets/CloseEvent.idl: Added a 'V8CustomConstructor' attribute.
2886
2887 2011-09-26  Nate Chapin  <japhet@chromium.org>
2888
2889         Clean up CachedResource::load(). Collapse its
2890         logic into a single callsite, taking just a
2891         CachedResourceLoader and a ResourceLoaderOptions.
2892
2893         1. Its 'incremental' parameter is redundant.
2894         2. With 'incremental' removed, the SecurityCheckPolicy is the only
2895            parameter difference between the CachedResource::load() variants.
2896            Making it a part of ResourceLoaderOptions removes yet another random
2897            enum that is passed around individually.
2898         3. We currently have to call setResourceLoaderOptions() before load() on a
2899            new CachedResource, so we should just take the ResourceLoaderOptions in load().
2900
2901         https://bugs.webkit.org/show_bug.cgi?id=67443
2902
2903         Reviewed by Antti Koivisto.
2904
2905         No new tests, refactor only.
2906
2907         * loader/DocumentThreadableLoader.cpp:
2908         * loader/FrameLoaderTypes.h: Move SecurityCheckPolicy to ResourceLoaderOptions.h.
2909         * loader/MainResourceLoader.cpp:
2910         * loader/NetscapePlugInStreamLoader.cpp:
2911         * loader/ResourceLoadScheduler.cpp:
2912         * loader/ResourceLoadScheduler.h:
2913         * loader/ResourceLoader.cpp: Enforce SecurityCheckPolicy here instead of SubresourceLoader.
2914         * loader/ResourceLoaderOptions.h: Store SecurityCheckPolicy on ResourceLoaderOptions.
2915         * loader/SubresourceLoader.cpp:
2916         * loader/SubresourceLoader.h:
2917         * loader/cache/CachedFont.cpp:
2918         * loader/cache/CachedFont.h:
2919         * loader/cache/CachedImage.cpp:
2920         * loader/cache/CachedImage.h:
2921         * loader/cache/CachedResource.cpp:
2922         * loader/cache/CachedResource.h:
2923         * loader/cache/CachedResourceLoader.cpp:
2924         (WebCore::defaultCachedResourceOptions): Define the default ResourceLoaderOptions for
2925             CachedResource loads here instead of as a default parameter on requestResource().
2926         * loader/cache/CachedResourceLoader.h:
2927         * loader/cache/CachedResourceRequest.cpp:
2928         (WebCore::CachedResourceRequest::didReceiveData): Remove m_incremental, since its purpose
2929             is already enforced in the data() implementation of every CachedResource that doesn't want
2930             incremental loads.
2931         * loader/cache/CachedResourceRequest.h:
2932
2933 2011-09-26  Joshua Bell  <jsbell@chromium.org>
2934
2935         IndexedDB: Second half of IDBFactory.getDatabaseNames implementation
2936         https://bugs.webkit.org/show_bug.cgi?id=68818
2937
2938         Reviewed by Tony Chang.
2939
2940         Test: storage/indexeddb/factory-basics.html
2941
2942         Adds ability to enumerate IndexedDB databases within an origin.
2943
2944         * bindings/v8/custom/V8IDBAnyCustom.cpp:
2945         (WebCore::toV8):
2946         * storage/IDBAny.cpp:
2947         (WebCore::IDBAny::domStringList):
2948         (WebCore::IDBAny::set):
2949         * storage/IDBAny.h:
2950         * storage/IDBBackingStore.h:
2951         * storage/IDBCallbacks.h:
2952         * storage/IDBFactory.cpp:
2953         (WebCore::IDBFactory::getDatabaseNames):
2954         * storage/IDBFactory.h:
2955         * storage/IDBFactory.idl:
2956         * storage/IDBFactoryBackendImpl.cpp:
2957         (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
2958         (WebCore::IDBFactoryBackendImpl::open):
2959         (WebCore::IDBFactoryBackendImpl::openBackingStore):
2960         * storage/IDBFactoryBackendImpl.h:
2961         * storage/IDBFactoryBackendInterface.h:
2962         * storage/IDBLevelDBBackingStore.cpp:
2963         (WebCore::IDBLevelDBBackingStore::getDatabaseNames):
2964         (WebCore::IDBLevelDBBackingStore::getObjectStores):
2965         (WebCore::IDBLevelDBBackingStore::getIndexes):
2966         * storage/IDBLevelDBBackingStore.h:
2967         * storage/IDBLevelDBCoding.cpp:
2968         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encodeMinKeyForOrigin):
2969         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encodeStopKeyForOrigin):
2970         * storage/IDBLevelDBCoding.h:
2971         * storage/IDBRequest.cpp:
2972         (WebCore::IDBRequest::onSuccess):
2973         * storage/IDBRequest.h:
2974         * storage/IDBSQLiteBackingStore.cpp:
2975         (WebCore::IDBSQLiteBackingStore::getDatabaseNames):
2976         * storage/IDBSQLiteBackingStore.h:
2977
2978 2011-09-26  Tim Horton  <timothy_horton@apple.com>
2979
2980         <animateColor> applied to filtered ellipse does not update
2981         https://bugs.webkit.org/show_bug.cgi?id=68457
2982         <rdar://problem/10154777>
2983
2984         Reviewed by Darin Adler.
2985
2986         Invalidate the filter's cache when style changes take place so that style changes are respected.
2987
2988         Test: svg/filters/animate-fill.svg
2989
2990         * rendering/svg/SVGResourcesCache.cpp:
2991         (WebCore::SVGResourcesCache::clientStyleChanged):
2992         (WebCore::SVGResourcesCache::clientUpdatedFromElement):
2993
2994 2011-09-26  Max Perepelitsyn  <pph34r@gmail.com>
2995
2996         Set but unused variables cleanup in v8 bindings (gcc 4.6)
2997         https://bugs.webkit.org/show_bug.cgi?id=68079
2998
2999         Reviewed by Adam Barth.
3000
3001         Test: http/tests/websocket/tests/hybi/send-object-tostring-check.html
3002
3003         * bindings/scripts/CodeGeneratorV8.pm:
3004         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3005         (WebCore::ConfigureV8TestMediaQueryListListenerTemplate):
3006         * bindings/scripts/test/V8/V8TestObj.cpp:
3007         (WebCore::ConfigureV8TestObjTemplate):
3008         * bindings/v8/WorkerScriptDebugServer.cpp:
3009         (WebCore::WorkerScriptDebugServer::addListener):
3010         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
3011         (WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
3012         * bindings/v8/custom/V8WebSocketCustom.cpp:
3013         (WebCore::V8WebSocket::sendCallback):
3014
3015 2011-09-26  Tony Chang  <tony@chromium.org>
3016
3017         switch the initial value of flex-order to 0
3018         https://bugs.webkit.org/show_bug.cgi?id=68820
3019
3020         The spec changed from having an initial value of 1 to 0.
3021
3022         Reviewed by Ojan Vafai.
3023
3024         * rendering/style/RenderStyle.h:
3025         (WebCore::InheritedFlags::initialFlexOrder):
3026
3027 2011-09-26  Chris Rogers  <crogers@google.com>
3028
3029         OfflineAudioDestinationNode must wait for thread completion in uninitialize()
3030         https://bugs.webkit.org/show_bug.cgi?id=68725
3031
3032         Reviewed by Kenneth Russell.
3033
3034         No new tests.  This fixes internal implementation details.
3035
3036         * webaudio/OfflineAudioDestinationNode.cpp:
3037         (WebCore::OfflineAudioDestinationNode::uninitialize):
3038
3039 2011-09-26  Xan Lopez  <xlopez@igalia.com>
3040
3041         [GTK] Do not ignore 'Replaceable' attributes in the DOM bindings
3042         https://bugs.webkit.org/show_bug.cgi?id=68837
3043
3044         Reviewed by Martin Robinson.
3045
3046         * bindings/scripts/CodeGeneratorGObject.pm: add getters (but not
3047         setters) for 'Replaceable' attributes. Punt for the future
3048         actually making them settable, since it seems non trivial.
3049
3050 2011-09-26  Ryosuke Niwa  <rniwa@webkit.org>
3051
3052         Leopard build fix.
3053
3054         * testing/Internals.cpp:
3055         (WebCore::Internals::setZoomAnimatorTransform):
3056
3057 2011-09-26  Joshua Bell  <jsbell@chromium.org>
3058
3059         IndexedDB: Null key path gets stored as empty string key path
3060         https://bugs.webkit.org/show_bug.cgi?id=68726
3061
3062         Reviewed by Tony Chang.
3063
3064         Store additional flag to indicate if object store key path
3065         is null vs. empty. Added additional runtime tests for integrity
3066         of object store metadata.
3067
3068         * storage/IDBLevelDBBackingStore.cpp:
3069         (WebCore::checkObjectStoreAndMetaDataType):
3070         (WebCore::IDBLevelDBBackingStore::getObjectStores):
3071         (WebCore::IDBLevelDBBackingStore::createObjectStore):
3072         * storage/IDBLevelDBCoding.cpp:
3073
3074 2011-09-26  John Bauman  <jbauman@chromium.org>
3075
3076         Fix nonpremultiplied webgl toDataURL to jpeg
3077         https://bugs.webkit.org/show_bug.cgi?id=68366
3078
3079         The canvas spec says that toDataURL to formats without an alpha must
3080         be "composited onto a solid black background using the source-over
3081         operator." Do that.
3082
3083         Reviewed by Kenneth Russell.
3084
3085         * platform/graphics/cg/ImageBufferCG.cpp:
3086         (WebCore::CGImageToDataURL):
3087         (WebCore::ImageBuffer::toDataURL):
3088         (WebCore::ImageDataToDataURL):
3089         * platform/image-encoders/skia/JPEGImageEncoder.cpp:
3090         (WebCore::RGBAtoRGB):
3091
3092 2011-09-26  Raphael Kubo da Costa  <kubo@profusion.mobi>
3093
3094         [CMake] Remove FindFreetype.cmake
3095         https://bugs.webkit.org/show_bug.cgi?id=68778
3096
3097         Reviewed by Adam Barth.
3098
3099         CMake has provided its own FindFreetype.cmake forever, so there is no
3100         need to have another implementation in WebKit.
3101
3102         No new tests, just a buildsystem change.
3103
3104         * CMakeListsEfl.txt: Use FREETYPE_{LIBRARIES,INCLUDE_DIRS} instead of
3105         Freetype_{LIBRARIES,INCLUDE_DIRS}.
3106
3107 2011-09-26  Alexei Svitkine  <asvitkine@chromium.org>
3108
3109         Fix full-page rubber band overhang appearing when gesturing during a slow page load.
3110         https://bugs.webkit.org/show_bug.cgi?id=68568
3111
3112         Chromium bug: http://code.google.com/p/chromium/issues/detail?id=97243
3113
3114         (This also happens on Safari.)
3115
3116         The problem was that ScrollView::overhangAmount() was returning a full-page overhang due to contentsSize() being 0 briefly during a page load, which was then getting used by ScrollAnimatorChromiumMac.mm to update the overhang on a gesture event. This change makes the relevant logic not return an overhang if the contentsSize() is empty.
3117
3118         Reviewed by Adam Barth.
3119
3120         No new tests, since this is highly timing-related.
3121
3122         * platform/ScrollView.cpp:
3123         (WebCore::ScrollView::overhangAmount):
3124         (WebCore::ScrollView::wheelEvent):
3125
3126 2011-09-26  W. James MacLean  <wjmaclean@chromium.org>
3127
3128         [chromium] Revise zoom animator backend to use full transform instead of just scale.
3129         https://bugs.webkit.org/show_bug.cgi?id=68535
3130
3131         Reviewed by Kenneth Russell.
3132
3133         * page/Settings.cpp:
3134         (WebCore::Settings::Settings):
3135         * page/Settings.h:
3136         (WebCore::Settings::setZoomAnimatorScale):
3137         (WebCore::Settings::zoomAnimatorScale):
3138         (WebCore::Settings::setZoomAnimatorPosition):
3139         (WebCore::Settings::zoomAnimatorPosX):
3140         (WebCore::Settings::zoomAnimatorPosY):
3141         * platform/graphics/chromium/LayerRendererChromium.cpp:
3142         (WebCore::LayerRendererChromium::LayerRendererChromium):
3143         (WebCore::LayerRendererChromium::drawLayersInternal):
3144         * platform/graphics/chromium/LayerRendererChromium.h:
3145         (WebCore::LayerRendererChromium::setZoomAnimatorTransform):
3146         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3147         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
3148         (WebCore::CCLayerTreeHost::commitTo):
3149         (WebCore::CCLayerTreeHost::setZoomAnimatorTransform):
3150         (WebCore::CCLayerTreeHost::updateLayers):
3151         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3152         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3153         (WebCore::CCLayerTreeHostImpl::setZoomAnimatorTransform):
3154         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3155         * testing/Internals.cpp:
3156         (WebCore::Internals::setZoomAnimatorTransform):
3157         * testing/Internals.h:
3158         * testing/Internals.idl:
3159
3160 2011-09-26  Dan Bernstein  <mitz@apple.com>
3161
3162         REGRESSION (r95926) Assert firing in svg/clip-path/clip-path-on-svg.svg
3163         https://bugs.webkit.org/show_bug.cgi?id=68819
3164
3165         Reviewed by Dave Hyatt.
3166
3167         * rendering/RenderObject.cpp:
3168         (WebCore::RenderObject::scheduleRelayout): Revert to using view() instead of the RenderView**
3169         parameter of isRooted, since only the former returns 0 when the document is detached.
3170
3171 2011-09-26  Vsevolod Vlasov  <vsevik@chromium.org>
3172
3173         Web Inspector: XMLHttpRequest console logging messages should link to network panel when possible.
3174         https://bugs.webkit.org/show_bug.cgi?id=67399
3175
3176         Reviewed by Pavel Feldman.
3177
3178         * inspector/ConsoleMessage.cpp:
3179         (WebCore::ConsoleMessage::ConsoleMessage):
3180         * inspector/ConsoleMessage.h:
3181         * inspector/InspectorConsoleAgent.cpp:
3182         (WebCore::InspectorConsoleAgent::resourceRetrievedByXMLHttpRequest):
3183         * inspector/InspectorConsoleAgent.h:
3184         * inspector/InspectorInstrumentation.cpp:
3185         (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
3186         * inspector/front-end/ConsoleMessage.js:
3187         (WebInspector.ConsoleMessage.prototype._formatMessage.else.else.linkifier):
3188         (WebInspector.ConsoleMessage.prototype._formatMessage):
3189         * inspector/front-end/ResourcesPanel.js:
3190         (WebInspector.ResourcesPanel.prototype.showAnchorLocation):
3191         * inspector/front-end/inspector.js:
3192         (WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
3193         (WebInspector.linkifyStringAsFragment):
3194
3195 2011-09-26  Jer Noble  <jer.noble@apple.com>
3196
3197         White flash when entering full-screen using element.webkitRequestFullScreen()
3198         https://bugs.webkit.org/show_bug.cgi?id=68481
3199
3200         Reviewed by Simon Fraser.
3201
3202         No new tests; covered by existing full screen tests.
3203
3204         During an animation, renderers may try to paint into the FullScreenRenderer's 
3205         GraphicsLayer, and an optimization we previously added for the FullScreenRenderer's 
3206         background will cause these paints to fail. Remove this optimization in 
3207         containsPaintedContent, and taking non-composited elements into full screen will
3208         animate correctly.
3209
3210         * rendering/RenderLayerBacking.cpp:
3211         (WebCore::RenderLayerBacking::containsPaintedContent):
3212
3213 2011-09-26  Mihai Parparita  <mihaip@chromium.org>
3214
3215         Unreviewed, rolling out r95960.
3216         http://trac.webkit.org/changeset/95960
3217         https://bugs.webkit.org/show_bug.cgi?id=58608
3218
3219         Significantly changes table border rendering
3220
3221         * rendering/RenderObject.cpp:
3222         (WebCore::RenderObject::drawLineForBoxSide):
3223
3224 2011-09-23  Simon Fraser  <simon.fraser@apple.com>
3225
3226         Repaint tests don't work in WebKit2
3227         https://bugs.webkit.org/show_bug.cgi?id=68453
3228
3229         Reviewed by Sam Weinig.
3230
3231         Have FrameView keep track of repaint rects when asked to, and
3232         expose this set of repaint rects via private WebKit API for later
3233         use by DumpRenderTree.
3234         
3235         The repaint rects are in WebView coordinates, so we have to
3236         unapply the scroll offset.
3237
3238         * WebCore.exp.in:
3239         * page/FrameView.cpp:
3240         (WebCore::FrameView::FrameView):
3241         (WebCore::FrameView::reset):
3242         (WebCore::FrameView::repaintContentRectangle):
3243         (WebCore::FrameView::setTracksRepaints):
3244         * page/FrameView.h:
3245         (WebCore::FrameView::isTrackingRepaints):
3246         (WebCore::FrameView::resetTrackedRepaints):
3247         (WebCore::FrameView::trackedRepaintRects):
3248
3249 2011-09-26  Antti Koivisto  <antti@apple.com>
3250
3251         Optimize matching of common pseudo classes
3252         https://bugs.webkit.org/show_bug.cgi?id=68633
3253
3254         Reviewed by Dave Hyatt, Darin Adler, Dimitri Glazkov.
3255         
3256         :link, :visited and :focus are quite common. They often used as univeral selectors (including in our
3257         default stylesheet) so we try to match them for all elements in the document. They take always the 
3258         slow matching path. In addition we match link styles twice due to visited link pseudo style generation
3259         so the overhead is doubled. As a result substantial portion of our style matching time is spent 
3260         dealing with these pseudo classes. 
3261         
3262         This patch adds new lists to RuleSet for common pseudo class rules. The rules on the lists are only checked
3263         if the element has approprate type and stat. ases where the rightmost pseudo class can then be rejected immediately.
3264         We can also enable the fast path checking for the rest of the selector in many cases.
3265     
3266         This seems to be >30% progression in selector matching performance with typical style sheets. It saves ~0.9s
3267         when loading the full HTML5 spec.
3268
3269         * css/CSSStyleSelector.cpp:
3270         (WebCore::RuleData::hasRightmostSelectorMatchingHTMLBasedOnRuleHash):
3271         (WebCore::RuleSet::idRules):
3272         (WebCore::RuleSet::classRules):
3273         (WebCore::RuleSet::tagRules):
3274         (WebCore::RuleSet::shadowPseudoElementRules):
3275         (WebCore::RuleSet::linkPseudoClassRules):
3276         (WebCore::RuleSet::visitedPseudoClassRules):
3277         (WebCore::RuleSet::focusPseudoClassRules):
3278         (WebCore::RuleSet::universalRules):
3279         (WebCore::RuleSet::pageRules):
3280         
3281             Add a new lists, some stylistic renamings.
3282     
3283         (WebCore::CSSStyleSelector::matchRules):
3284         
3285             New link and focus checks.
3286
3287         (WebCore::CSSStyleSelector::matchRulesForList):
3288         (WebCore::CSSStyleSelector::checkSelector):
3289         
3290             Inline the rightmost selector tag checking, skip if unnecessary.
3291         
3292         (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
3293         
3294             Common pseudo classes now match based on early filtering (though it is not a hash in this case).
3295
3296         (WebCore::RuleData::RuleData):
3297         (WebCore::RuleSet::~RuleSet):
3298         (WebCore::RuleSet::addRule):
3299         
3300             Sort pseudo classes to new lists.
3301         
3302         (WebCore::RuleSet::collectFeatures):
3303         (WebCore::RuleSet::shrinkToFit):
3304         (WebCore::CSSStyleSelector::matchPageRules):
3305         * css/SelectorChecker.cpp:
3306         (WebCore::SelectorChecker::checkSelector):
3307         
3308             Adopt to expanded fast path (this is used by querySelectorAll).
3309
3310         (WebCore::SelectorChecker::fastCheckRightmostSelector):
3311         (WebCore::SelectorChecker::fastCheckSelector):
3312         
3313             Rightmost selector is now checked differently than the rest. RuleSet based selection in CSSStyleSelector
3314             is equivalent to fastCheckRightmostSelector().
3315         
3316         (WebCore::isFastCheckableRelation):
3317         (WebCore::isFastCheckableMatch):
3318         (WebCore::isFastCheckableRightmostSelector):
3319         (WebCore::SelectorChecker::isFastCheckableSelector):
3320         (WebCore::SelectorChecker::checkOneSelector):
3321         (WebCore::SelectorChecker::commonPseudoClassSelectorMatches):
3322         (WebCore::SelectorChecker::isFrameFocused):
3323         * css/SelectorChecker.h:
3324         (WebCore::SelectorChecker::isCommonPseudoClassSelector):
3325         (WebCore::SelectorChecker::linkMatchesVisitedPseudoClass):
3326         (WebCore::SelectorChecker::matchesFocusPseudoClass):
3327         (WebCore::SelectorChecker::tagMatches):
3328         
3329             Refactor a bunch of shared checks into functions.
3330
3331 2011-09-12  Ryosuke Niwa  <rniwa@webkit.org>
3332
3333         REGRESSION(r74971): Selection doesn't work correctly in BiDi Text
3334         https://bugs.webkit.org/show_bug.cgi?id=57340
3335
3336         Reviewed by Eric Seidel.
3337
3338         This patch adds the end point adjustment mechanism at bidi boundaries similar to the one NSTextView implements.
3339
3340         To understand the problem, suppose we have strong RTL letters "ABC" in a LTR block (visually laid out as CBA).
3341
3342         Per NSTextView convention, logical offsets between each letter is placed as (0)C(2)B(1)A(3). In other words,
3343         placing the caret visually on the left of CBA yields the position inside the text node of "ABC" at offset 0.
3344         Likewise, placing it between C and B yields ("ABC", 2), and placing it on the right of CBA yields ("ABC", 3).
3345
3346         Now suppose a user attempts to select the letter A by a mouse drag from the right of CBA to a point between
3347         B and A. First, the initial mouse down places the selection's base at ("ABC", 3). Then as the mouse pointer
3348         moves to a point on the left of A, the selection's extent is set at ("ABC", 1), selecting "BC".
3349
3350         To mitigate this issue, NSTextView adjusts selection base and extent under certain conditions. In the above
3351         example, NSTextView detects user's intent and changes the selection's base to ("ABC", 0) temporarily.
3352
3353         This patch implements a similar trick on WebKit. We adjust the base or the extent when they're at the left
3354         end or at the right end of a bidi run and the other end is inside of the run. In the above example, the
3355         base position on the right of A is the right end of a bidi run and the extent position between B and A is
3356         inside the same run (CBA), so we would adjust the base to be ("ABC", 0) as NSTextView does.
3357
3358         Take another example abcABC. Note offsets are assigned as (0)a(1)b(2)c(3)C(5)B(4)A(6) When the user starts
3359         a mouse drag from the right of A to a point between B and A, we adjust the selection base to be ("abcABC", 3)
3360         because the base is at the right end of a bidi run and the extent is in the same run. We keep the adjustment
3361         when the mouse pointer moves to a point between C and B. However, when the mouser pointer reaches a point
3362         between letters b and c, the selection extent is placed at ("abcABC", 2). Because the extent is outside of
3363         the bidi run started from the selection base, we restore the original base at this point. Had we not done this,
3364         we'll end up selecting just "c".
3365
3366         While this algorithm is implemented in FrameSelection::setNonDirectionalSelectionIfNeeded, this patch adds
3367         various member functions to RenderedPosition to facilitate abstraction around inline boxes and bidi runs.
3368
3369         Test: editing/selection/select-bidi-run.html
3370
3371         * editing/FrameSelection.cpp:
3372         (WebCore::adjustEndpointsAtBidiBoundary): Added. Implements the endpoints adjustment algorithm.
3373         (WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded): Calls adjustEndpointsAtBidiBoundary, and
3374         restores the original base as needed.
3375         * editing/FrameSelection.h:
3376         * editing/RenderedPosition.cpp:
3377         (WebCore::RenderedPosition::RenderedPosition):
3378         (WebCore::RenderedPosition::prevLeafChild): Added to cache prevLeafChild of the current inline box.
3379         (WebCore::RenderedPosition::nextLeafChild): Ditto for nextLeafChild.
3380         (WebCore::RenderedPosition::isEquivalent): Compares two RenderedPositions considering neighboring inline boxes
3381         so that the rightmost position in a box and the leftmost position in the following box is considered equal.
3382         (WebCore::RenderedPosition::bidiLevelOnLeft): Added. Returns the bidi level of the run on the left. We can't
3383         add a generic bidiLevel to this class because it'll be ambiguous at bidi boundaries.
3384         (WebCore::RenderedPosition::bidiLevelOnRight): Ditto for the run on the right.
3385         (WebCore::RenderedPosition::leftBoundaryOfBidiRun): Added.
3386         (WebCore::RenderedPosition::rightBoundaryOfBidiRun): Added.
3387         (WebCore::RenderedPosition::atLeftBoundaryOfBidiRun): Added.
3388         (WebCore::RenderedPosition::atRightBoundaryOfBidiRun): Added.
3389         (WebCore::RenderedPosition::positionAtLeftBoundaryOfBiDiRun): Returns Position at the left edge of a bidi run
3390         if RenderedPosition is at such a position. Asserts atLeftBoundaryOfBidiRun.
3391         (WebCore::RenderedPosition::positionAtRightBoundaryOfBiDiRun): Ditto for the right edge.
3392         * editing/RenderedPosition.h:
3393         (WebCore::RenderedPosition::atLeftBoundaryOfBidiRun): Added.
3394         (WebCore::RenderedPosition::atRightBoundaryOfBidiRun): Added.
3395         (WebCore::RenderedPosition::atLeftmostOffsetInBox): Added.
3396         (WebCore::RenderedPosition::atRightmostOffsetInBox): Added.
3397         (WebCore::RenderedPosition::uncachedInlineBox): Added. We can't use a static const variable because gcc thinks
3398         reinterpret_cast<InlineBox*>(1) is not an integral value.
3399         (WebCore::RenderedPosition::RenderedPosition):
3400         * editing/VisibleSelection.h:
3401         (WebCore::VisibleSelection::visibleBase): Added.
3402         (WebCore::VisibleSelection::visibleExtent): Added.
3403         * page/EventHandler.cpp:
3404         (WebCore::EventHandler::updateSelectionForMouseDrag):
3405
3406 2011-09-26  Sheriff Bot  <webkit.review.bot@gmail.com>
3407
3408         Unreviewed, rolling out r95256.
3409         http://trac.webkit.org/changeset/95256
3410         https://bugs.webkit.org/show_bug.cgi?id=68814
3411
3412         Temporary CRASH calls no longer needed (Requested by enne on
3413         #webkit).
3414
3415         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3416         (WebCore::CCLayerTreeHost::commitTo):
3417
3418 2011-09-26  Mark Rowe  <mrowe@apple.com>
3419
3420         <http://webkit.org/b/68809> IconDatabase::syncThreadMainLoop can assert if wakeSyncThread is called before thread starts executing
3421
3422         If wakeSyncThread is called before syncThreadMainLoop starts executing then m_syncThreadHasWorkToDo would be set
3423         while executing the body of the sync thread loop, causing us to skip blocking on the condition variable. This would
3424         lead to us hitting the assertion failure due to m_disabledSuddenTerminationForSyncThread being false, unless the main
3425         thread happened to call wakeSyncThread a second time while the first loop iteration was executing.
3426
3427         Reviewed by Anders Carlsson.
3428
3429         * loader/icon/IconDatabase.cpp:
3430         (WebCore::IconDatabase::syncThreadMainLoop): Clear m_syncThreadHasWorkToDo to indicate that we're about to perform
3431         all pending work.
3432
3433 2011-09-26  Antaryami Pandia  <antaryami.pandia@motorola.com>
3434
3435         Groove/inset/outset borders show solid if the color is black.
3436         https://bugs.webkit.org/show_bug.cgi?id=58608
3437
3438         Reviewed by Simon Fraser.
3439
3440         Lightened the border side colors when drawing borders with styles as
3441         Outset/Inset/Groove/Ridge.
3442
3443         Tests: fast/borders/border-groove.html
3444                fast/borders/border-inset.html
3445                fast/borders/border-outset.html
3446                fast/borders/border-ridge.html
3447
3448         * rendering/RenderObject.cpp:
3449         (WebCore::RenderObject::drawLineForBoxSide):
3450
3451 2011-09-26  Abhishek Arya  <inferno@chromium.org>
3452
3453         Delete retired custom font data only on document
3454         destruction, and not on recalc style.
3455         https://bugs.webkit.org/show_bug.cgi?id=68805
3456
3457</