[Qt][Texmap] Convert shaders in TextureMapperGL to use a macro
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-01-05  No'am Rosenthal  <noam.rosenthal@nokia.com>
2
3         [Qt][Texmap] Convert shaders in TextureMapperGL to use a macro
4         https://bugs.webkit.org/show_bug.cgi?id=75598
5
6         Use VERTEX_SHADER() and FRAGMENT_SHADER() macros, instead of quoted string literals when
7         declaring shaders in TextureMapperGL.
8
9         We need two macros to account for the differences between OpenGL and OpenGL ES2.
10
11         Reviewed by Martin Robinson.
12
13 2012-01-05  Ryosuke Niwa  <rniwa@webkit.org>
14
15         sizeof(CSSRule) is 20 instead of 12 on Windows
16         https://bugs.webkit.org/show_bug.cgi?id=75665
17
18         Reviewed by Darin Fisher.
19
20         Unlike gcc and clang, MSVC pads each consecutive member variables of the same type
21         in bitfields. e.g. if you have:
22
23         sturct AB {
24         unsigned m_1 : 31;
25         bool m_2 : 1;
26         }
27
28         then MSVC pads m_1 and allocates sizeof(unsigned) * 2 for AB whereas gcc and clang
29         only allocate sizeof(unsigned) * 1 for AB.
30
31         Fix the bloat by turning all bitfields in CSSRule either signed or unsigned integers.
32
33         * css/CSSRule.cpp:
34         * css/CSSRule.h:
35         (WebCore::CSSRule::sourceLine):
36         (WebCore::CSSRule::setSourceLine):
37         (WebCore::CSSRule::hasCachedSelectorText):
38         (WebCore::CSSRule::setHasCachedSelectorText):
39         * css/CSSStyleRule.cpp:
40         (WebCore::CSSStyleRule::CSSStyleRule):
41         (WebCore::CSSStyleRule::cleanup):
42         (WebCore::CSSStyleRule::selectorText):
43         (WebCore::CSSStyleRule::setSelectorText):
44         * css/CSSStyleRule.h:
45
46 2012-01-05  David Grogan  <dgrogan@chromium.org>
47
48         IndexedDB: fix cursor prefetch crash
49         http://crbug.com/108071
50         https://bugs.webkit.org/show_bug.cgi?id=75596
51
52         Reviewed by Tony Chang.
53
54         Test: storage/indexeddb/prefetch-bugfix-108071.html
55         Note: DumpRenderTree doesn't exercise the bug, it only occurs in
56         multi-process chromium.  The layout test will soon be run as a
57         chromium ui test: http://codereview.chromium.org/9108004
58
59         * storage/IDBCursorBackendImpl.cpp:
60         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
61         (WebCore::IDBCursorBackendImpl::~IDBCursorBackendImpl): Destroy
62         cursors before their objectstores.
63         (WebCore::IDBCursorBackendImpl::prefetchReset): Don't run continue if
64         the cursor is closed.
65         (WebCore::IDBCursorBackendImpl::close): Set a closed flag.
66         * storage/IDBCursorBackendImpl.h:
67
68 2012-01-04  James Robinson  <jamesr@chromium.org>
69
70         [chromium] Route all animate calls through CCLayerTreeHost in composited mode to simplify rate limiting logic
71         https://bugs.webkit.org/show_bug.cgi?id=75577
72
73         Reviewed by Darin Fisher.
74
75         This internalizes the animation rate limiting logic to CCLayerTreeHost and removes the setters/getters for the
76         m_animating flag. This requires that all animation updates have to go through CCLayerTreeHost to get the right
77         rate limiting behavior, regardless of which proxy is being used.
78
79         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
80         (WebCore::CCLayerTreeHost::updateAnimations):
81         (WebCore::CCLayerTreeHost::layout):
82         (WebCore::CCLayerTreeHost::startRateLimiter):
83         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
84         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
85         (WebCore::CCThreadProxy::beginFrameAndCommit):
86
87 2012-01-05  Justin Novosad  <junov@chromium.org>
88
89         [Chromium] NativeImageSkia should mark SkBitmaps as immutable
90         https://bugs.webkit.org/show_bug.cgi?id=74962
91
92         Removed m_isDataComplete from class NativeImageSkia. Instead, data
93         completeness will be tracked through SkBitmap::setImmutable/
94         isImmutable.  The immutable state signifies that the pixel data
95         will no longer change for the lifetime of the bitmap, which corresponds
96         to the semantic of the old m_isDataComplete member. setImmutable is
97         also called on the cached resized bitmap, since it too is invariant for
98         its life time. Temporary resized bitmaps are also marked as immutable
99         since they technically are.
100
101         Reviewed by Stephen White.
102
103         * platform/graphics/skia/NativeImageSkia.cpp:
104         (WebCore::NativeImageSkia::NativeImageSkia):
105         (WebCore::NativeImageSkia::resizedBitmap):
106         (WebCore::NativeImageSkia::shouldCacheResampling):
107         * platform/graphics/skia/NativeImageSkia.h:
108         (WebCore::NativeImageSkia::setDataComplete):
109         (WebCore::NativeImageSkia::isDataComplete):
110
111 2012-01-05  Sheriff Bot  <webkit.review.bot@gmail.com>
112
113         Unreviewed, rolling out r104231.
114         http://trac.webkit.org/changeset/104231
115         https://bugs.webkit.org/show_bug.cgi?id=75668
116
117         Breaks the Qt build (Requested by abarth on #webkit).
118
119         * platform/SchemeRegistry.cpp:
120         * platform/SchemeRegistry.h:
121
122 2012-01-05  Beth Dakin  <bdakin@apple.com>
123
124         https://bugs.webkit.org/show_bug.cgi?id=75654
125         Text fields should draw using NSTextFieldCell instead of WebKitSystemInterface
126
127         Reviewed by John Sullivan.
128
129         This change should not have any affect on tests or real web sites. It just changed 
130         the implementation under the hood to the more modern NSCell approach.
131         * rendering/RenderThemeMac.h:
132         * rendering/RenderThemeMac.mm:
133         (WebCore::RenderThemeMac::paintTextField):
134         (WebCore::RenderThemeMac::textField):
135
136 2012-01-05  Ryosuke Niwa  <rniwa@webkit.org>
137
138         Add a compile-time assertion for the size of CSSValue
139         https://bugs.webkit.org/show_bug.cgi?id=75635
140
141         Reviewed by Tony Chang.
142
143         Tightened the compile-time assertion.
144
145         * css/CSSValue.cpp:
146
147 2012-01-05  Adam Barth  <abarth@webkit.org>
148
149         [V8] CodeGeneration for SerializedScriptValue doesn't play nice with [Constructor]
150         https://bugs.webkit.org/show_bug.cgi?id=75641
151
152         Reviewed by David Levin.
153
154         Rather than generate getters for SerializedScriptValues, we eagerly
155         deserialize them into JavaScript objects.  However, previously, we were
156         only doing that for DOM wrappers created by taking an existing C++
157         object and wrapping it.  For objects created with Constructors (e.g.,
158         those with the [Constructor] attribute), we need to do this eager
159         deserialization during the constructor as well.
160
161         This bug isn't observable yet, but it is causing the WebIntent test
162         being added in Bug 73051 to fail.
163
164         Test: TestSerializedScriptValueInterface.idl
165               webintents/web-intents-api.html (after Bug 73051 lands)
166
167         * bindings/scripts/CodeGeneratorV8.pm:
168         (GenerateEagerDeserialization):
169         (GenerateConstructorCallback):
170         (GenerateNamedConstructorCallback):
171         (GenerateImplementation):
172         (GenerateToV8Converters):
173         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
174         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
175         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getConstructData):
176         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
177         * bindings/scripts/test/TestSerializedScriptValueInterface.idl:
178         * bindings/scripts/test/V8/V8TestInterface.cpp:
179         (WebCore::V8TestInterface::constructorCallback):
180         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
181         (WebCore::V8TestNamedConstructorConstructorCallback):
182         * bindings/scripts/test/V8/V8TestObj.cpp:
183         (WebCore::V8TestObj::constructorCallback):
184         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
185         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
186         (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate):
187         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
188
189 2012-01-05  Adam Barth  <abarth@webkit.org>
190
191         Introduce Platform namespace for WebCore/platform
192         https://bugs.webkit.org/show_bug.cgi?id=75653
193
194         Reviewed by Eric Seidel.
195
196         This patch introduces the Platform namespace for WebCore/platform.
197         Introducing this namespace will help us find and fix layering
198         violations in preparation for moving WebCore/platform to Platform.
199
200         * platform/SchemeRegistry.cpp:
201         * platform/SchemeRegistry.h:
202
203 2012-01-05  Ryosuke Niwa  <rniwa@webkit.org>
204
205         Inserting nodes is slow due to Node::notifyNodeListsAttributeChanged (20%+)
206         https://bugs.webkit.org/show_bug.cgi?id=73853
207
208         Reviewed by Antti Koivisto.
209
210         Lazily invalidate the node list caches instead of invaliding them at the time of modification. We use
211         the DOM tree version to detect whether caches need to be invalidated or not. We now invalidate caches more
212         frequently after this patch (in particular, invalidates caches that are stored on nodes not present in
213         the ancestry of the modified nodes); however, our study on major Web sites such as Gmail, Facebook, Twitter,
214         etc... indicate that about 1% of real-world usage benefits from keeping the caches alive across different
215         DOM tree versions.
216
217         In order to invalidate caches lazily, this patch adds replaces the type of m_caches in DynamicSubtreeNodeList
218         by DynamicSubtreeNodeList::SubtreeCaches which encapsulates member variables in DynamicNodeList::Caches and
219         invalidates values as needed. Also this change allows m_caches to be allocated as a part of
220         DynamicSubtreeNodeList instead of a separate ref-counted object.
221
222         * dom/Attr.cpp:
223         (WebCore::Attr::setValue):
224         (WebCore::Attr::childrenChanged):
225         * dom/DynamicNodeList.cpp:
226         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
227         (WebCore::DynamicSubtreeNodeList::length):
228         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
229         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
230         (WebCore::DynamicSubtreeNodeList::item):
231         (WebCore::DynamicSubtreeNodeList::invalidateCache):
232         (WebCore::DynamicNodeList::Caches::create):
233         (WebCore::DynamicNodeList::Caches::reset):
234         * dom/DynamicNodeList.h:
235         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::SubtreeCaches): Added.
236         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::isLengthCacheValid): Added.
237         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::isItemCacheValid): Added.
238         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedLength): Added.
239         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItem): Added.
240         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItemOffset): Added.
241         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setLengthCache): Added.
242         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setItemCache): Added.
243         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::reset): Added.
244         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::domVersionIsConsistent): Added.
245         * dom/Element.cpp:
246         (WebCore::Element::updateAfterAttributeChanged):
247         * dom/Node.cpp:
248         (WebCore::Node::setTreeScopeRecursively): Clear caches when a node moves from one document to another.
249         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Only clears child node list of Attr.
250         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Only clears child node list.
251         (WebCore::NodeListsNodeData::invalidateCaches): Merged with invalidateCachesThatDependOnAttributes.
252         * dom/Node.h:
253         * dom/NodeRareData.h:
254         * html/HTMLElement.cpp:
255         (WebCore::HTMLElement::parseMappedAttribute):
256         * html/HTMLLabelElement.cpp:
257         * html/HTMLLabelElement.h:
258
259 2012-01-05  Ojan Vafai  <ojan@chromium.org>
260
261         IE quirk for percentage size on a table element doesn't work with orthogonal writing modes
262         https://bugs.webkit.org/show_bug.cgi?id=70195
263
264         Reviewed by Eric Seidel.
265
266         Remove this quirk entirely. Mozilla and Opera don't implement it and IE
267         doesn't restrict the quirk to standards mode. As it's unlikely for
268         webkit-only content to hit this quirk (e.g. use tables for layout),
269         it should be relatively safe to match Mozilla/Opera here.
270
271         Test: fast/writing-mode/table-percent-width-quirk.html
272
273         * rendering/RenderBlock.cpp:
274         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
275
276 2012-01-05  Tien Ren Chen  <trchen@chromium.org>
277
278         [chromium] Add CCTimer class for the compositor
279         https://bugs.webkit.org/show_bug.cgi?id=74769
280
281         Reviewed by James Robinson.
282
283         Add a simple timer class for CCThread that the timered task can be
284         manually cancelled.
285
286         * WebCore.gypi:
287         * platform/graphics/chromium/cc/CCTimer.cpp: Added.
288         (WebCore::CCTimerTask::CCTimerTask):
289         (WebCore::CCTimerTask::~CCTimerTask):
290         (WebCore::CCTimerTask::performTask):
291         (WebCore::CCTimer::CCTimer):
292         (WebCore::CCTimer::~CCTimer):
293         (WebCore::CCTimer::startOneShot):
294         (WebCore::CCTimer::stop):
295         * platform/graphics/chromium/cc/CCTimer.h: Added.
296         (WebCore::CCTimerClient::~CCTimerClient):
297         (WebCore::CCTimer::isActive):
298
299 2012-01-05  Eric Carlson  <eric.carlson@apple.com>
300
301         Implement temporal dimension portion of Media Fragments URI specification for video/audio
302         https://bugs.webkit.org/show_bug.cgi?id=65838
303
304         Reviewed by Sam Weinig.
305
306         Tests: media/media-fragments/TC0001-TC0009.html
307                media/media-fragments/TC0010-TC0019.html
308                media/media-fragments/TC0020-TC0029.html
309                media/media-fragments/TC0030-TC0039.html
310                media/media-fragments/TC0040-TC0049.html
311                media/media-fragments/TC0050-TC0059.html
312                media/media-fragments/TC0060-TC0069.html
313                media/media-fragments/TC0070-TC0079.html
314                media/media-fragments/TC0080-TC0089.html
315                media/media-fragments/TC0090-TC0099.html
316
317         * CMakeLists.txt: Add fragment parser files.
318         * GNUmakefile.list.am: Ditto.
319         * Target.pri: Ditto.
320         * WebCore.gypi: Ditto.
321         * WebCore.vcproj/WebCore.vcproj: Ditto.
322         * WebCore.xcodeproj/project.pbxproj: Ditto.
323
324         * html/HTMLMediaElement.cpp:
325         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_fragmentStartTime and m_fragmentEndTime.
326         (WebCore::HTMLMediaElement::setReadyState): Check for and parse a media fragment once readyState
327             reaches HAVE_METADATA, apply it once it reaches HAVE_CURRENT_DATA.
328         (WebCore::HTMLMediaElement::initialTime): Return the fragment start time if possible.
329         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Pause if the time is >= the fragment
330             end time.
331         (WebCore::HTMLMediaElement::prepareMediaFragmentURI): Look for a temporal fragment.
332         (WebCore::HTMLMediaElement::applyMediaFragmentURI): Apply the fragment, if any.
333         * html/HTMLMediaElement.h:
334
335         * html/MediaFragmentURIParser.cpp: Added.
336         (WebCore::skipWhiteSpace):
337         (WebCore::collectDigits):
338         (WebCore::collectFraction):
339         (WebCore::MediaFragmentURIParser::invalidTimeValue):
340         (WebCore::MediaFragmentURIParser::MediaFragmentURIParser):
341         (WebCore::MediaFragmentURIParser::startTime):
342         (WebCore::MediaFragmentURIParser::endTime):
343         (WebCore::MediaFragmentURIParser::parseFragments):
344         (WebCore::MediaFragmentURIParser::parseTimeFragment):
345         (WebCore::MediaFragmentURIParser::parseNPTFragment):
346         (WebCore::MediaFragmentURIParser::parseNPTTime):
347         * html/MediaFragmentURIParser.h: Added.
348         (WebCore::MediaFragmentURIParser::~MediaFragmentURIParser):
349         (WebCore::MediaFragmentURIParser::create):
350
351 2012-01-05  ChangSeok Oh  <shivamidow@gmail.com>
352
353         Remove style warning in GraphicsContext3DOpenGL.cpp
354         https://bugs.webkit.org/show_bug.cgi?id=75466
355
356         Reviewed by Kenneth Russell.
357
358         Relocated some headers according to alphabetical order & modified indentation.
359         And used OwnArrayPtr to deal with character array.
360
361         No new tests required. 
362
363         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
364         (WebCore::GraphicsContext3D::getString):
365         (WebCore::GraphicsContext3D::releaseShaderCompiler):
366         (WebCore::GraphicsContext3D::getProgramInfoLog):
367         (WebCore::GraphicsContext3D::getShaderiv):
368         (WebCore::GraphicsContext3D::getShaderInfoLog):
369         (WebCore::GraphicsContext3D::getShaderSource):
370
371 2012-01-05  Ken Buchanan <kenrb@chromium.org>
372
373         Crash due to reparenting of relpositioned object under anonymous block
374         https://bugs.webkit.org/show_bug.cgi?id=70848
375
376         The associated test case creates a condition where a relative
377         positioned renderer is a descendant of an anonymous block for a
378         table column. The anonymous block is the containingBlock() for the
379         relpositioned renderer. Removal of a div causes the anonymous blocks to
380         be merged, and the renderer becomes a descendant of a different block.
381         Since the new containingBlock() has an empty positionedObject list,
382         the relpositioned renderer does not get layout after being dirtied.
383
384         This patch changes containingBlock() so that it returns the container
385         of an anonymous block for positioned objects, not the anonymous
386         block itself. It also adds an ASSERT to insertPositionedObject()
387         to flag any other cases where something is trying to create a
388         positioned object list on an anonymous block.
389
390         Reviewed by David Hyatt.
391
392         * rendering/RenderBlock.cpp:
393         (WebCore::RenderBlock::insertPositionedObject):
394         * rendering/RenderObject.cpp:
395         (WebCore::RenderObject::containingBlock):
396
397 2012-01-05  Jian Li  <jianli@chromium.org>
398
399         FileReader needs addEventListener
400         https://bugs.webkit.org/show_bug.cgi?id=42723
401
402         Reviewed by Adam Barth.
403
404         Test: fast/files/file-reader-event-listener.html
405
406         * fileapi/FileReader.idl:
407
408 2012-01-04  Pratik Solanki  <psolanki@apple.com>
409
410         Remove deprecated calls from CookieJarCFNet.cpp
411         https://bugs.webkit.org/show_bug.cgi?id=68958
412
413         Reviewed by Sam Weinig.
414
415         * platform/network/cf/CookieJarCFNet.cpp:
416         (WebCore::cookieDomain):
417         (WebCore::cookieExpirationTime):
418         (WebCore::cookieName):
419         (WebCore::cookiePath):
420         (WebCore::cookieValue):
421
422 2012-01-05  Fady Samuel  <fsamuel@chromium.org>
423
424         Move scalePageBy from eventSender to window.internals
425         https://bugs.webkit.org/show_bug.cgi?id=64512
426
427         Reviewed by Simon Fraser.
428
429         Added setPageScaleFactor to window.internals.
430         Renamed window.internals.getPageScaleFactor to window.internals.pageScaleFactor
431         to match the webkit style.
432
433         * testing/Internals.cpp:
434         (WebCore::Internals::pageScaleFactor):
435         (WebCore::Internals::setPageScaleFactor):
436         * testing/Internals.h:
437         * testing/Internals.idl:
438
439 2012-01-05  Cary Clark  <caryclark@google.com>
440
441         [Skia Mac] Rounded bezel style button needs one more local graphics context to scale
442         https://bugs.webkit.org/show_bug.cgi?id=75623
443         http://code.google.com/p/chromium/issues/detail?id=108749
444
445         In paintButton(), the local context is set up first, and later the context is
446         scaled if there's a zoomFactor. Skia creates the CoreGraphics context to draw the
447         button into without that scale factor. To fix this, another local context is added
448         after the parameter context scale, before the button draw. The first local context
449         is still required to restore the parameter context state.
450
451         Reviewed by Stephen White.
452
453         * platform/chromium/ThemeChromiumMac.mm:
454         (WebCore::paintButton):
455
456 2012-01-05  Alexis Menard  <alexis.menard@openbossa.org>
457
458         getComputedStyle for background is not implemented.
459         https://bugs.webkit.org/show_bug.cgi?id=75539
460
461         Reviewed by Tony Chang.
462
463         Implement getComputedStyle for background.
464
465         Test: fast/css/getComputedStyle/getComputedStyle-background-shorthand.html
466
467         * css/CSSComputedStyleDeclaration.cpp:
468         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
469
470 2012-01-05  Ryosuke Niwa  <rniwa@webkit.org>
471
472         DOM Attribute tests on Dromaeo spends 2.7% of time in hasSelectorForAttribute
473         https://bugs.webkit.org/show_bug.cgi?id=75569
474
475         Reviewed by Andreas Kling.
476
477         Check needsStyleRecalc() first to avoid unnecessary hash lookups.
478
479         * dom/Element.cpp:
480         (WebCore::Element::recalcStyleIfNeededAfterAttributeChanged):
481
482 2012-01-05  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
483
484         [EFL] Replace alloca to C++ new placement.
485         https://bugs.webkit.org/show_bug.cgi?id=72017
486
487         Reviewed by Andreas Kling.
488
489         Replaces alloca to C++ new placement as it is not very portable.
490         It allows to skip checking of memory allocation as new never returns NULL.
491         According to Edje's documentation type of val (member of Edje_Message_Float_Set)
492         is double so I changed it to avoid undefined behaviour.
493
494         * platform/efl/ScrollbarEfl.cpp:
495         (ScrollbarEfl::updateThumbPositionAndProportion):
496
497 2012-01-05  Benjamin Poulain  <bpoulain@apple.com>
498
499         Remove duplicate file references from WebCore.xcodeproj
500         https://bugs.webkit.org/show_bug.cgi?id=75581
501
502         Reviewed by Andreas Kling.
503
504         Many generated DOMSVG files had two references.
505
506         In platform/graphics, there was two arm directory
507         with the same files related to ARM Neon.
508
509         * WebCore.xcodeproj/project.pbxproj:
510
511 2012-01-05  Antti Koivisto  <antti@apple.com>
512
513         Improve SelectorChecker::determineSelectorScopes
514         https://bugs.webkit.org/show_bug.cgi?id=75619
515
516         Reviewed by Andreas Kling.
517
518         SelectorChecker::determineSelectorScopes currently searches to the end of the selector chain and
519         then sees if the last one is suitable to be a scope. A better algorithm will find a scope from
520         anywhere in the chain.
521         
522         With this patch we search the whole chain for potential scopes. We now prefer id scopes
523         over class scopes. Scopes can be found for rules using sibling selectors too.
524         
525         On both engadget.com and nytimes.com, we can now skip one more full style recalc due to 
526         the improved stylesheet analysis. 
527
528         * css/SelectorChecker.cpp:
529         (WebCore::SelectorChecker::determineSelectorScopes):
530
531 2012-01-05  Carlos Garcia Campos  <cgarcia@igalia.com>
532
533         [GTK] Use the default screen in PlatformScreenGtk methods when they are called with a NULL widget
534         https://bugs.webkit.org/show_bug.cgi?id=75620
535
536         Reviewed by Philippe Normand.
537
538         We are currently retuning an empty rectangle for
539         screenRect/screenAvailableRect and 0 for getVisual.
540
541         * platform/gtk/PlatformScreenGtk.cpp:
542         (WebCore::getVisual):
543         (WebCore::screenRect):
544         (WebCore::screenAvailableRect):
545
546 2012-01-05  Alpha Lam  <hclam@chromium.org>
547
548         Unreviewed. Build fix.
549
550         Adding missing const_cast<> to fix compilation failures due to r104143.
551
552         * platform/audio/VectorMath.cpp:
553         (WebCore::VectorMath::zvmul):
554
555 2012-01-05  Adam Barth  <abarth@webkit.org>
556
557         Move Gamepad declarations from Navigator.idl into Modules/gamepad
558         https://bugs.webkit.org/show_bug.cgi?id=75559
559
560         Reviewed by Eric Seidel.
561
562         This patch moves the gamepad-related declarations in Navigator.idl into
563         Modules/gamepad.  The next step is to move the state into
564         Modules/gamepad as well.
565
566         * Modules/gamepad/NavigatorGamepad.cpp: Added.
567         (WebCore::NavigatorGamepad::NavigatorGamepad):
568         (WebCore::NavigatorGamepad::~NavigatorGamepad):
569         (WebCore::NavigatorGamepad::webkitGamepads):
570         * Modules/gamepad/NavigatorGamepad.h: Added.
571         * Modules/gamepad/NavigatorGamepad.idl: Added.
572         * WebCore.gypi:
573         * page/Navigator.cpp:
574         (WebCore::Navigator::gamepads):
575         * page/Navigator.h:
576         * page/Navigator.idl:
577
578 2012-01-05  Alexis Menard  <alexis.menard@openbossa.org>
579
580         getComputedStyle for border-image is not implemented.
581         https://bugs.webkit.org/show_bug.cgi?id=75347
582
583         Reviewed by Tony Chang.
584
585         Implement getComputedStyle for border-color.
586
587         fast/css/getComputedStyle/computed-style-border-image.html was extended to cover the
588         new feature.
589
590         * css/CSSComputedStyleDeclaration.cpp:
591         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
592
593 2012-01-05  Xingnan Wang  <xingnan.wang@intel.com>
594
595         Add a SSE2 optimized function zvmul in VectorMatch
596         https://bugs.webkit.org/show_bug.cgi?id=74842
597
598         Reviewed by Kenneth Russell.
599
600         Use zvmul in FFTFrameFFMPEG.cpp::multiply() and FFTFrameMac.cpp::multiply().
601
602         * platform/audio/VectorMath.cpp:
603         (WebCore::VectorMath::zvmul):
604         * platform/audio/VectorMath.h:
605         * platform/audio/ffmpeg/FFTFrameFFMPEG.cpp:
606         (WebCore::FFTFrame::multiply):
607         * platform/audio/mac/FFTFrameMac.cpp:
608         (WebCore::FFTFrame::multiply):
609
610 2012-01-05  Alpha Lam  <hclam@chromium.org>
611
612         Unreviewed. Build fix for Chromium Mac Clang build.
613
614         Push using namespace WTF to .cpp file from .h file.
615
616         * platform/text/TextCodecASCIIFastPath.h:
617         * platform/text/TextCodecLatin1.cpp:
618         * platform/text/TextCodecUTF8.cpp:
619
620 2012-01-05  Max Vujovic  <mvujovic@adobe.com>
621
622         WebKit adds vertical paddings and borders to the fixed width of CSS tables
623         https://bugs.webkit.org/show_bug.cgi?id=74955
624
625         Reviewed by Julien Chaffraix.
626
627         Test: fast/table/css-table-width.html
628
629         * rendering/RenderTable.cpp:
630         (WebCore::RenderTable::computeLogicalWidth):
631
632             Changed the width calculation for CSS tables to take into account horizontal
633             paddings and borders instead of vertical paddings and borders.
634
635 2012-01-05  Peter Beverloo  <peter@chromium.org>
636
637         [Chromium] Upstream the RenderTheme and ScrollbarTheme for Android
638         https://bugs.webkit.org/show_bug.cgi?id=74614
639
640         Reviewed by Adam Barth.
641
642         Upstream the RenderTheme and ScrollbarTheme for Android. These are
643         mostly derived from their Linux variants.
644
645         RenderThemeChromiumAndroid inherits from RenderThemeChromiumLinux and
646         only overrides the three methods which have different behavior.
647         Scrollbars will be drawn in the threaded compositor for Android (which
648         will be upstreamed later), but for increased layout test parity we'll
649         match Chromium-Linux.
650
651         No new tests. This code will be exercised by existing layout tests, and
652         by manually verifying that theme parts render as expected.
653
654         * WebCore.gyp/WebCore.gyp:
655         * WebCore.gypi:
656         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp: Added.
657         (WebCore::ScrollbarTheme::nativeTheme):
658         (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
659         (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
660         (WebCore::ScrollbarThemeChromiumAndroid::shouldCenterOnThumb):
661         (WebCore::ScrollbarThemeChromiumAndroid::buttonSize):
662         (WebCore::ScrollbarThemeChromiumAndroid::minimumThumbLength):
663         * platform/chromium/ScrollbarThemeChromiumAndroid.h: Added.
664         * rendering/RenderThemeChromiumAndroid.cpp: Added.
665         (WebCore::RenderThemeChromiumAndroid::create):
666         (WebCore::RenderTheme::themeForPage):
667         (WebCore::RenderThemeChromiumAndroid::~RenderThemeChromiumAndroid):
668         (WebCore::RenderThemeChromiumAndroid::systemColor):
669         (WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle):
670         * rendering/RenderThemeChromiumAndroid.h: Added.
671         * rendering/RenderThemeChromiumLinux.cpp:
672         * rendering/RenderThemeChromiumLinux.h:
673
674 2012-01-05  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
675
676         Fix potential superlinear runtime of multiple indirect adjenceny combinators.
677         https://bugs.webkit.org/show_bug.cgi?id=75083
678
679         Reviewed by Antti Koivisto.
680
681         A sequence of indirect adjencency combinator such as "li ~ li ~ la" could with the
682         former algorithm potentially do an quadratic number of element matches.
683         The recursive matching algorithm now detects cases where all siblings have
684         failed one indirect sibling match and fails the entire selector.
685
686         Test: perf/nested-combined-selectors.html
687
688         * css/SelectorChecker.cpp:
689         (WebCore::SelectorChecker::checkSelector): Return SelectorFailsAllSiblings when
690         all siblings have failed a selector component.
691         * css/SelectorChecker.h: Add SelectorFailsAllSiblings enum value
692
693 2012-01-05  Andreas Kling  <awesomekling@apple.com>
694
695         InspectorStyleSheet: Avoid cloning CSSRuleLists.
696         <http://webkit.org/b/75603>
697
698         Reviewed by Ryosuke Niwa.
699
700         Don't filter out @charset rules from CSSRuleLists. This was forcing us to clone
701         the stylesheet rule list, and is unnecessary since InspectorStyleSheet disregards
702         any rule that isn't either a style rule or a rule with an internal rule list.
703
704         * inspector/InspectorStyleSheet.cpp:
705         (WebCore::asCSSRuleList):
706         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
707
708             Don't pass omitCharsetRules=true to the CSSRuleList constructor.
709
710 2012-01-05  Andreas Kling  <awesomekling@apple.com>
711
712         Make elements with attributes smaller by eliminating the ref count in NamedNodeMap.
713         <http://webkit.org/b/75068>
714
715         Reviewed by Antti Koivisto.
716
717         Remove NamedNodeMap's inheritance from RefCounted and forward the ref()/deref()
718         calls to its owner Element, effectively reducing the size of an element that has
719         attributes by 4 bytes.
720
721         This reduces memory consumption by 311 kB when viewing the full HTML5 spec.
722
723         * dom/NamedNodeMap.cpp:
724         (WebCore::NamedNodeMap::ref):
725         (WebCore::NamedNodeMap::deref):
726
727             Added. Forwards the operation to m_element. Only ever used by the DOM wrappers.
728
729         * dom/NamedNodeMap.h:
730         (WebCore::NamedNodeMap::create):
731         * dom/DocumentType.h:
732         * dom/Element.cpp:
733         (WebCore::Element::parserSetAttributeMap):
734         * dom/Element.h:
735         * html/parser/HTMLConstructionSite.cpp:
736         * html/parser/HTMLToken.h:
737         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
738         * html/parser/HTMLTreeBuilder.cpp:
739         (WebCore::HTMLTreeBuilder::processFakeStartTag):
740         (WebCore::HTMLTreeBuilder::attributesForIsindexInput):
741         * html/parser/HTMLTreeBuilder.h:
742         * html/parser/TextDocumentParser.cpp:
743         (WebCore::TextDocumentParser::insertFakePreElement):
744         * xml/parser/MarkupTokenBase.h:
745         (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
746         (WebCore::AtomicMarkupTokenBase::takeAttributes):
747         * xml/parser/XMLToken.h:
748         (WebCore::AtomicXMLToken::AtomicXMLToken):
749
750             Store NamedNodeMap in OwnPtr/PassOwnPtr, rather than RefPtr/PassRefPtr.
751
752 2012-01-05  Benjamin Poulain  <benjamin@webkit.org>
753
754         Improve charactersAreAllASCII() to compare multiple characters at a time
755         https://bugs.webkit.org/show_bug.cgi?id=74063
756
757         Reviewed by Darin Adler.
758
759         Move some part of TextCodecASCIIFastPath.h to WTF in ASCIIFastPath.h.
760         The function isAllASCII() is changed to the template version which now works
761         with both LChar and UChar.
762
763         * ForwardingHeaders/wtf/text/ASCIIFastPath.h: Added.
764         * platform/text/TextCodecASCIIFastPath.h:
765         (WebCore::copyASCIIMachineWord):
766         * platform/text/TextCodecLatin1.cpp:
767         (WebCore::TextCodecLatin1::decode):
768         * platform/text/TextCodecUTF8.cpp:
769         (WebCore::TextCodecUTF8::decode):
770
771 2012-01-05  Eric Uhrhane  <ericu@chromium.org>
772
773        [fileapi] WebKitFlags should not be constructable per Directories & System spec
774        https://bugs.webkit.org/show_bug.cgi?id=68916
775
776        Reviewed by Eric Seidel.
777
778        Remove IDL for the object and all DOM references to it.
779        * fileapi/WebKitFlags.idl: Removed.
780        * page/DOMWindow.idl:
781        * workers/WorkerContext.idl:
782        Remove references to the JSC/V8 objects compiled from the IDL.
783        * bindings/js/JSDirectoryEntryCustom.cpp:
784        (WebCore::JSDirectoryEntry::getFile):
785        (WebCore::JSDirectoryEntry::getDirectory):
786        * bindings/js/JSDirectoryEntrySyncCustom.cpp:
787        (WebCore::getFlags):
788        * bindings/v8/custom/V8DirectoryEntryCustom.cpp:
789        (WebCore::V8DirectoryEntry::getDirectoryCallback):
790        (WebCore::V8DirectoryEntry::getFileCallback):
791        * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp:
792        (WebCore::getFlags):
793        Fix up build files.
794        * WebCore.gypi:
795        * WebCore.vcproj/WebCore.vcproj:
796        * WebCore.xcodeproj/project.pbxproj:
797        * WebCore/CMakeLists.txt:
798        * WebCore/CodeGenerators.pri:
799        * WebCore/DerivedSources.cpp:
800        * WebCore/DerivedSources.make:
801        * WebCore/GNUmakefile.list.am:
802
803 2012-01-05  Ken Buchanan  <kenrb@chromium.org>
804
805         Crash due to first-letter block processing
806         https://bugs.webkit.org/show_bug.cgi?id=74009
807
808         Fixing the way updateFirstLetter() finds the remaining text fragment
809         for a given first-letter. Previously this was unreliable in some
810         circumstances.
811
812         This patch provides a reliable mechanism to identify the remaining
813         text by storing first-letter to remaining text associations in a
814         hash map, managed by methods in RenderBoxModelObject.
815
816         Reviewed by David Hyatt.
817
818         * rendering/RenderBlock.cpp:
819         (WebCore::RenderBlock::updateFirstLetter)
820         * rendering/RenderBoxModelObject.cpp:
821         (WebCore::RenderBoxModelObject::willBeDestroyed):
822         (WebCore::RenderBoxModelObject::setFirstLetterRemainingText): Added
823         (WebCore::RenderBoxModelObject::firstLetterRemainingText): Added
824         * rendering/RenderBoxModelObject.h:
825         (WebCore::RenderBoxModelObject::setFirstLetterRemainingText): Added
826         (WebCore::RenderBoxModelObject::firstLetterRemainingText): Added
827
828 2012-01-05  Mihnea Ovidenie  <mihnea@adobe.com>
829
830         Crash in RenderRegion::getRegionRangeForBox.
831         https://bugs.webkit.org/show_bug.cgi?id=74781
832
833         Reviewed by David Hyatt.
834
835         Test: fast/regions/region-range-for-box-crash.html
836
837         This patch fixes 2 issues:
838         1. When removing a region from a flow thread, we clear the region range information for boxes since
839         this information is accurate only after the regions are laid out.
840         2. While the regions are invalidated (content of flow thread is not yet laid out in regions), the
841         functions that ask for properties of content in regions should bail out early.
842
843         * rendering/RenderBlock.cpp:
844         (WebCore::RenderBlock::regionAtBlockOffset):
845         (WebCore::RenderBlock::logicalWidthChangedInRegions):
846         * rendering/RenderBox.cpp:
847         (WebCore::RenderBox::clearRenderBoxRegionInfo):
848         * rendering/RenderFlowThread.cpp:
849         (WebCore::RenderFlowThread::removeRegionFromThread):
850         (WebCore::RenderFlowThread::repaintRectangleInRegions):
851         (WebCore::RenderFlowThread::mapFromFlowToRegion):
852         (WebCore::RenderFlowThread::contentLogicalWidthOfFirstRegion):
853         (WebCore::RenderFlowThread::contentLogicalHeightOfFirstRegion):
854         (WebCore::RenderFlowThread::contentLogicalLeftOfFirstRegion):
855         (WebCore::RenderFlowThread::firstRegion):
856         (WebCore::RenderFlowThread::lastRegion):
857         (WebCore::RenderFlowThread::getRegionRangeForBox):
858         * rendering/RenderFlowThread.h:
859
860 2012-01-04  Sheriff Bot  <webkit.review.bot@gmail.com>
861
862         Unreviewed, rolling out r104084.
863         http://trac.webkit.org/changeset/104084
864         https://bugs.webkit.org/show_bug.cgi?id=75600
865
866         Likely kills dom-perf benchmark in chromium
867         http://build.chromium.org/f/chromium/perf/linux-
868         release/dom_perf/report.html?history=150&rev=116444 (Requested
869         by dslomov on #webkit).
870
871         * dom/Attr.cpp:
872         (WebCore::Attr::setValue):
873         (WebCore::Attr::childrenChanged):
874         * dom/DynamicNodeList.cpp:
875         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
876         (WebCore::DynamicSubtreeNodeList::length):
877         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
878         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
879         (WebCore::DynamicSubtreeNodeList::item):
880         (WebCore::DynamicSubtreeNodeList::invalidateCache):
881         (WebCore::DynamicSubtreeNodeList::Caches::create):
882         (WebCore::DynamicSubtreeNodeList::Caches::reset):
883         * dom/DynamicNodeList.h:
884         * dom/Element.cpp:
885         (WebCore::Element::updateAfterAttributeChanged):
886         * dom/Node.cpp:
887         (WebCore::Node::setTreeScopeRecursively):
888         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
889         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged):
890         (WebCore::Node::notifyLocalNodeListsLabelChanged):
891         (WebCore::Node::itemTypeAttributeChanged):
892         (WebCore::NodeListsNodeData::invalidateCaches):
893         (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes):
894         * dom/Node.h:
895         * dom/NodeRareData.h:
896         * html/HTMLElement.cpp:
897         (WebCore::HTMLElement::parseMappedAttribute):
898         * html/HTMLLabelElement.cpp:
899         (WebCore::HTMLLabelElement::parseMappedAttribute):
900         * html/HTMLLabelElement.h:
901
902 2012-01-04  James Robinson  <jamesr@chromium.org>
903
904         [chromium] Remove chromium compositor support for unused zoomAnimatorTransform
905         https://bugs.webkit.org/show_bug.cgi?id=75585
906
907         Reviewed by Kenneth Russell.
908
909         Removes compositor support for zoomAnimatorTransform property. This code is unused and never was used.
910         Zoom animations are handled by adjusting the page scale factor and scroll offsets.
911
912         * platform/graphics/chromium/LayerChromium.h:
913         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
914         * platform/graphics/chromium/cc/CCLayerImpl.h:
915         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
916         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
917         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
918         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
919         (WebCore::calculateDrawTransformsAndVisibilityInternal):
920         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
921         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
922
923 2012-01-04  Kenneth Russell  <kbr@google.com>
924
925         Fix semantics of WEBKIT_WEBGL_lose_context
926         https://bugs.webkit.org/show_bug.cgi?id=75053
927
928         Reviewed by James Robinson.
929
930         Updated WEBGL_lose_context extension to match WebGL spec's
931         behavior:
932
933           - loseContext() causes the context to be lost immediately, but
934             the webglcontextlost event isn't dispatched until JavaScript
935             returns.
936           - restoreContext() may only be called once dispatch of the
937             webglcontextlost event has completed, *and* if that event handler
938             prevented the default behavior of the event.
939           - restoreContext() performs its work asynchronously. The context
940             is not restored until just before the webglcontextrestored event
941             is dispatched.
942
943         * html/canvas/WebGLRenderingContext.cpp:
944         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
945         (WebCore::WebGLRenderingContext::forceLostContext):
946         (WebCore::WebGLRenderingContext::forceRestoreContext):
947         (WebCore::WebGLRenderingContext::dispatchContextLostEvent):
948         (WebCore::WebGLRenderingContext::maybeRestoreContext):
949         * html/canvas/WebGLRenderingContext.h:
950
951 2011-12-30  Ryosuke Niwa  <rniwa@webkit.org>
952
953         Inserting nodes is slow due to Node::notifyNodeListsAttributeChanged (20%+)
954         https://bugs.webkit.org/show_bug.cgi?id=73853
955
956         Reviewed by Antti Koivisto.
957
958         Lazily invalidate the node list caches instead of invaliding them at the time of modification. We use
959         the DOM tree version to detect whether caches need to be invalidated or not. We now invalidate caches more
960         frequently after this patch (in particular, invalidates caches that are stored on nodes not present in
961         the ancestry of the modified nodes); however, our study on major Web sites such as Gmail, Facebook, Twitter,
962         etc... indicate that about 1% of real-world usage benefits from keeping the caches alive across different
963         DOM tree versions.
964
965         In order to invalidate caches lazily, this patch adds replaces the type of m_caches in DynamicSubtreeNodeList
966         by DynamicSubtreeNodeList::SubtreeCaches which encapsulates member variables in DynamicNodeList::Caches and
967         invalidates values as needed. Also this change allows m_caches to be allocated as a part of
968         DynamicSubtreeNodeList instead of a separate ref-counted object.
969
970         * dom/Attr.cpp:
971         (WebCore::Attr::setValue):
972         (WebCore::Attr::childrenChanged):
973         * dom/DynamicNodeList.cpp:
974         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
975         (WebCore::DynamicSubtreeNodeList::length):
976         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
977         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
978         (WebCore::DynamicSubtreeNodeList::item):
979         (WebCore::DynamicSubtreeNodeList::invalidateCache):
980         (WebCore::DynamicNodeList::Caches::create):
981         (WebCore::DynamicNodeList::Caches::reset):
982         * dom/DynamicNodeList.h:
983         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::SubtreeCaches): Added.
984         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::isLengthCacheValid): Added.
985         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::isItemCacheValid): Added.
986         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedLength): Added.
987         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItem): Added.
988         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItemOffset): Added.
989         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setLengthCache): Added.
990         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setItemCache): Added.
991         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::reset): Added.
992         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::domVersionIsConsistent): Added.
993         * dom/Element.cpp:
994         (WebCore::Element::updateAfterAttributeChanged):
995         * dom/Node.cpp:
996         (WebCore::Node::setTreeScopeRecursively): Clear caches when a node moves from one document to another.
997         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Only clears child node list of Attr.
998         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Only clears child node list.
999         (WebCore::NodeListsNodeData::invalidateCaches): Merged with invalidateCachesThatDependOnAttributes.
1000         * dom/Node.h:
1001         * dom/NodeRareData.h:
1002         * html/HTMLElement.cpp:
1003         (WebCore::HTMLElement::parseMappedAttribute):
1004         * html/HTMLLabelElement.cpp:
1005         * html/HTMLLabelElement.h:
1006
1007 2012-01-04  Ryosuke Niwa  <rniwa@webkit.org>
1008
1009         Revert unintentional changes to Element.cpp in r104068.
1010
1011         * dom/Element.cpp:
1012         (WebCore::Element::recalcStyleIfNeededAfterAttributeChanged):
1013
1014 2012-01-03  Ryosuke Niwa  <rniwa@webkit.org>
1015
1016         REGRESSION (r92823): Background color not preserved when copying and pasting a table row
1017         https://bugs.webkit.org/show_bug.cgi?id=75330
1018
1019         Reviewed by Tony Chang.
1020
1021         The bug was caused by the background color of the wrapping style overriding the background color
1022         in a matched rule of a highest element to be serialized. Fixed the bug by removing the conflicting
1023         background color prior to the merge.
1024
1025         Tests: editing/pasteboard/copy-element-with-conflicting-background-color-from-rule-expected.html
1026                editing/pasteboard/copy-element-with-conflicting-background-color-from-rule.html
1027
1028         * editing/EditingStyle.cpp:
1029         (WebCore::editingStyleFromComputedStyle):
1030         (WebCore::EditingStyle::removeStyleAddedByNode):
1031         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
1032
1033 2012-01-03  Antti Koivisto  <antti@apple.com>
1034
1035         Reviewed by Dave Hyatt.
1036
1037         Analyze stylesheet scope to minimize style recalcs
1038         https://bugs.webkit.org/show_bug.cgi?id=75508
1039         
1040         It is a relatively common pattern to use inline stylesheets in document body where all rules are scoped using descendant selector
1041
1042         <style>
1043         #foo {...}
1044         #foo div {...}
1045         #foo .bar {...}
1046         </style>
1047
1048         When this pattern is used it is also common that the rules only apply to elements that come after the style element. 
1049
1050         When the set of active stylesheets changes we invalidate and recompute the entire document style. This is very expensive. We can 
1051         detect the case above and avoid the style recalc.
1052         
1053         On engadget.com, this patch cuts the time spent in style recalcs to roughly half. There are further savings from reduced 
1054         relayouts. In total the engine CPU time used over the page load is reduced by ~10%.
1055
1056         * css/CSSStyleSelector.cpp:
1057         (WebCore::CSSStyleSelector::CSSStyleSelector):
1058         (WebCore::CSSStyleSelector::collectFeatures):
1059         
1060             Refactor feature collection from constructor to a separate function.
1061         
1062         (WebCore::CSSStyleSelector::appendAuthorStylesheets):
1063         
1064             New function for non-destructively updating the style selector.
1065         
1066         (WebCore::CSSStyleSelector::Features::clear):
1067         
1068             Clear the features for another collection.
1069             
1070         (WebCore::CSSStyleSelector::determineStylesheetSelectorScopes):
1071         
1072             Find if all rules on a stylesheetare scoped to some set of ids and classes.
1073         
1074         (WebCore::CSSStyleSelector::styleForDocument):
1075         
1076             Add optional font selector argument. We updated the correct base style font on style selector construction but that is no longer sufficient
1077             as font selector may be updated without reconstructing the style selector.
1078         
1079         (WebCore::RuleSet::addRulesFromSheet):
1080         
1081             Invalidate the matched declaration cache in case of new font-face rules.
1082         
1083         * css/CSSStyleSelector.h:
1084         * css/SelectorChecker.cpp:
1085         (WebCore::SelectorChecker::determineSelectorScopes):
1086         
1087             Find if all rules on a selector list are scoped to some set of ids and classes.
1088         
1089         * css/SelectorChecker.h:
1090         * dom/Document.cpp:
1091         (WebCore::Document::Document):
1092         (WebCore::Document::recalcStyle):
1093         
1094             Pass the font selector, if exists, to styleForDocument so we always have the base font up to date.
1095         
1096         (WebCore::Document::combineCSSFeatureFlags):
1097         (WebCore::Document::resetCSSFeatureFlags):
1098         (WebCore::Document::createStyleSelector):
1099
1100             Refactor css feature flag resetting to functions.
1101         
1102         (WebCore::Document::removePendingSheet):
1103         
1104             Use new PendingStylesheetCompleted flag when new stylesheets arrive.
1105
1106         (WebCore::Document::styleSelectorChanged):
1107
1108             Skip style recalc if it is not needed.
1109
1110         (WebCore::Document::collectActiveStylesheets):
1111         
1112             Refactor collecting stylesheets to a separate function.
1113         
1114         (WebCore::Document::testAddedStylesheetRequiresStyleRecalc):
1115         
1116             Determine the scopes and use hasElementWithId/getElementsByClassName to figure out if any scoped elements currently exist in the tree.
1117         
1118         (WebCore::Document::analyzeStylesheetChange):
1119         
1120             Figure out if we can update the style selector incrementally and if we can skip the style recalc.
1121         
1122         (WebCore::Document::updateActiveStylesheets):
1123         
1124             Renamed from recalcStyleSelector.
1125             Invoke the new analysis functions.
1126         
1127         * dom/Document.h:
1128
1129 2012-01-04  Igor Oliveira  <igor.oliveira@openbossa.org>
1130
1131         Share fractional time code between AnimationBase and KeyframeAnimation
1132         https://bugs.webkit.org/show_bug.cgi?id=75549
1133
1134         Remove left over from changeset 104045.
1135
1136         Unreviewed trivial fix.
1137
1138         * page/animation/AnimationBase.cpp:
1139         (WebCore::AnimationBase::fractionalTime):
1140
1141 2012-01-04  Igor Oliveira  <igor.oliveira@openbossa.org>
1142
1143         Share fractional time code between AnimationBase and KeyframeAnimation
1144         https://bugs.webkit.org/show_bug.cgi?id=75549
1145
1146         Share fractional time calculation between AnimationBase and KeyframeAnimation.
1147
1148         Reviewed by Simon Fraser.
1149
1150         * page/animation/AnimationBase.cpp:
1151         (WebCore::AnimationBase::fractionalTime):
1152         (WebCore::AnimationBase::progress):
1153         * page/animation/AnimationBase.h:
1154         * page/animation/KeyframeAnimation.cpp:
1155         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
1156
1157 2012-01-03  Vangelis Kokkevis  <vangelis@chromium.org>
1158
1159         [chromium] Bypass the shadow texture copy for accelerated
1160         canvas when running the compositor in single threaded mode.
1161         https://bugs.webkit.org/show_bug.cgi?id=75146
1162
1163         The texture copy fails on Windows as glCopyTexImage2D() doesn't
1164         support BGRA source textures.
1165         This change also modifies Canvas2DLayerChromium::updateCompositorResources
1166         to call glCopyTexSubImage2D() instead of glCopyTexImage2D() so that
1167         the copy can work with texture allocated via the glTexStorage2D
1168         extension.
1169
1170         Reviewed by James Robinson.
1171
1172         Tests: Canvas2DLayerChromiumTest.cpp
1173
1174         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1175         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
1176         (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
1177         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
1178         (WebCore::Canvas2DLayerChromium::setTextureManager):
1179         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
1180         (WebCore::Canvas2DLayerChromium::pushPropertiesTo):
1181         (WebCore::Canvas2DLayerChromium::unreserveContentsTexture):
1182         (WebCore::Canvas2DLayerChromium::cleanupResources):
1183         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1184
1185 2012-01-04  Adam Roben  <aroben@apple.com>
1186
1187         Use one big printf command instead of many chained echo commands to generate idl_files.tmp
1188
1189         This works around a bug in Cygwin where sh.exe will crash if given a too-long sequence of
1190         &&-chained commands.
1191
1192         Fixes <http://webkit.org/b/75546> <rdar://problem/10622193> REGRESSION (r103519): WebCore's
1193         DerivedSources.make crashes sh.exe if path to WebKit source tree is long enough
1194
1195         Reviewed by Antti Koivisto.
1196
1197         * DerivedSources.make: Change the '(echo foo && echo bar && echo baz && echo -n) >
1198         ./idl_files.tmp' command to 'printf "foo\nbar\nbaz\n" > ./idl_files.tmp'. We use the
1199         patsubst function to append "\n" to each IDL filename, then use the subst function to remove
1200         the spaces between the filenames.
1201
1202 2012-01-04  Mihnea Ovidenie  <mihnea@adobe.com>
1203
1204         [CSSRegions]Rollout support for background-color region styling
1205         https://bugs.webkit.org/show_bug.cgi?id=75007
1206
1207         Reviewed by Tony Chang.
1208
1209         Removed functionality, therefore no new tests. Since this is a temporary rollout,
1210         the tests for region-style with background-color are not removed in this patch, just skipped.
1211
1212         * WebCore.exp.in:
1213         * css/CSSStyleSelector.cpp:
1214         (WebCore::CSSStyleSelector::CSSStyleSelector):
1215         (WebCore::CSSStyleSelector::addMatchedDeclaration):
1216         (WebCore::CSSStyleSelector::matchRules):
1217         (WebCore::CSSStyleSelector::matchAllRules):
1218         (WebCore::CSSStyleSelector::styleForElement):
1219         (WebCore::CSSStyleSelector::pseudoStyleForElement):
1220         (WebCore::RuleData::RuleData):
1221         (WebCore::RuleSet::RuleSet):
1222         (WebCore::RuleSet::addToRuleSet):
1223         (WebCore::CSSStyleSelector::applyDeclarations):
1224         (WebCore::CSSStyleSelector::applyProperty):
1225         * css/CSSStyleSelector.h:
1226         * rendering/RenderFlowThread.cpp:
1227         (WebCore::RenderFlowThread::setRegionRangeForBox):
1228         * rendering/RenderFlowThread.h:
1229         * rendering/RenderLayer.cpp:
1230         (WebCore::RenderLayer::paint):
1231         (WebCore::RenderLayer::hitTest):
1232         * rendering/RenderObject.cpp:
1233         * rendering/RenderObject.h:
1234         * rendering/RenderObjectChildList.cpp:
1235         (WebCore::RenderObjectChildList::removeChildNode):
1236         * rendering/RenderRegion.cpp:
1237         * rendering/RenderRegion.h:
1238         * rendering/RenderView.cpp:
1239         (WebCore::RenderView::RenderView):
1240         * rendering/RenderView.h:
1241
1242 2012-01-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1243
1244         [Qt] Introduce new qmake variable 'WEBKIT' for signaling dependencies
1245
1246         The custom qmake variable 'WEBKIT' is used for signaling that a
1247         target depends in some way on other subproject of the WebKit
1248         project. For now this is limited to the set of intermediate
1249         libraries: wtf, javascriptcore, webcore, and webkit2.
1250
1251         This replaces the previous convension of using load(foo) for
1252         just include paths, and CONFIG += foo to also link against foo.
1253
1254         Adding a dependency results in additional include paths being
1255         available, and potentially linking to the library. This is
1256         decided by the build system based on conditions such as what
1257         kind of target is being built and the general build config.
1258
1259         An advantage to his approach is that it simplifies the individual
1260         foo.prf files, for example by allowing us to use INCLUDEPATH +=
1261         and LIBS += as normal instead of prepending.
1262
1263         Reviewed by Simon Hausmann.
1264
1265         * Target.pri:
1266
1267 2012-01-03  Adam Barth  <abarth@webkit.org>
1268
1269         HTMLConstructionSite::attach shouldn't return a value
1270         https://bugs.webkit.org/show_bug.cgi?id=75520
1271
1272         Reviewed by Eric Seidel.
1273
1274         We used to return a value to avoid some refchurn, but now that we're
1275         using tasks, we always need to take that reference.  Removing the
1276         return value lets us remove the template parameter, which is a boon.
1277         This patch has no impact on the html-parser.html benchmark.
1278
1279         * html/parser/HTMLConstructionSite.cpp:
1280         (WebCore::HTMLConstructionSite::attachLater):
1281         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
1282         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
1283         (WebCore::HTMLConstructionSite::insertDoctype):
1284         (WebCore::HTMLConstructionSite::insertComment):
1285         (WebCore::HTMLConstructionSite::insertCommentOnDocument):
1286         (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
1287         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
1288         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
1289         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
1290         (WebCore::HTMLConstructionSite::insertHTMLElement):
1291         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
1292         (WebCore::HTMLConstructionSite::insertScriptElement):
1293         (WebCore::HTMLConstructionSite::insertForeignElement):
1294         (WebCore::HTMLConstructionSite::insertTextNode):
1295         (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
1296         (WebCore::HTMLConstructionSite::fosterParent):
1297         * html/parser/HTMLConstructionSite.h:
1298
1299 2012-01-03  Adam Barth  <abarth@webkit.org>
1300
1301         Fix assert when foster parenting self-closing elements
1302         https://bugs.webkit.org/show_bug.cgi?id=75527
1303
1304         Unreviewed.
1305
1306         * html/parser/HTMLConstructionSite.cpp:
1307         (WebCore::HTMLConstructionSite::fosterParent):
1308             - We can't execute this task immediately because the code for
1309               self-closing elements wants to set the self-closing flag.
1310               Instead, we queue the task.
1311
1312 2012-01-03  Charles Wei  <charles.wei@torchmobile.com.cn>
1313
1314         [BlackBerry] Need to support credentials in the URL
1315         https://bugs.webkit.org/show_bug.cgi?id=75341
1316
1317         Reviewed by George Staikos.
1318
1319         No new tests required.
1320
1321         * platform/network/blackberry/NetworkJob.cpp:
1322         (WebCore::NetworkJob::sendRequestWithCredentials):
1323
1324 2012-01-03  Noel Gordon  <noel.gordon@gmail.com>
1325
1326         [chromium] Use data decoding swizzle for turbo JPEG grayscale images
1327         https://bugs.webkit.org/show_bug.cgi?id=75189
1328
1329         Reviewed by Adam Barth.
1330
1331         No new tests.  Covered by exiting tests, in particular for grayscale
1332         images that were corrupted by earlier versions on libjpeg-turbo:
1333
1334         tables/mozilla/bugs/bug29314.html
1335         tables/mozilla/bugs/bug13169.html
1336         tables/mozilla/bugs/bug10565.html
1337         tables/mozilla/bugs/bug11026.html
1338         fast/repaint/backgroundSizeRepaint.html
1339         fast/repaint/block-layout-inline-children-replaced.html
1340         fast/repaint/clipped-relative.html
1341         fast/repaint/selected-replaced.html
1342         tables/mozilla/bugs/bug12908-1.html
1343
1344         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1345         (WebCore::JPEGImageReader::decode):  Use a data decoding swizzle for
1346         JCS_GRAYSCALE images.
1347
1348 2012-01-03  Adam Barth  <abarth@webkit.org>
1349
1350         Minor speed improvement in HTML parser
1351         https://bugs.webkit.org/show_bug.cgi?id=75517
1352
1353         Reviewed by Eric Seidel.
1354
1355         This improves the html-parser.html benchmark by 0.3%.  I don't think
1356         that's actually anything to write home about, but this patch makes me
1357         feel better about my life.
1358
1359         * html/parser/HTMLFormattingElementList.cpp:
1360         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
1361
1362 2012-01-03  Kentaro Hara  <haraken@chromium.org>
1363
1364         Remove temporary code that we've inserted to implement the [Supplemental] IDL incrementally
1365         https://bugs.webkit.org/show_bug.cgi?id=75510
1366
1367         Reviewed by Adam Barth.
1368
1369         Now all build systems support the [Supplemental] IDL. This patch removes all
1370         temporary code that we've inserted to implement the [Supplemental] IDL.
1371
1372         No tests. No change in behavior. Confirm that all builds pass.
1373
1374         * bindings/js/JSDOMWindowCustom.cpp:
1375         * bindings/scripts/CodeGeneratorJS.pm:
1376         (GenerateHeader):
1377         * bindings/scripts/generate-bindings.pl:
1378         * page/DOMWindow.idl: Removed all attributes with a temporal [Supplemented] IDL.
1379
1380 2012-01-03  Karl Koscher  <supersat@chromium.org>
1381
1382         Give embedders a chance to handle postMessage calls
1383         https://bugs.webkit.org/show_bug.cgi?id=73883
1384
1385         To support cross-process postMessage calls in Chromium (bug 73337), we need to intercept 
1386         postMessage calls to proxy windows. Originally we were just going to add a native event
1387         listener on the Chromium side, but that required more changes to WebKit and was a bit of
1388         a hack. See bug 73359 for a discuss about moving to this approach.
1389
1390         Reviewed by Adam Barth.
1391
1392         Test: platform/chromium/fast/events/intercept-postmessage.html
1393
1394         * loader/FrameLoaderClient.h:
1395         (WebCore::FrameLoaderClient::willCheckAndDispatchPostMessage): new method to allow the
1396             embedder to intercept postMessage calls
1397         * page/DOMWindow.cpp:
1398         (WebCore::DOMWindow::postMessageTimerFired): add a call to
1399             FrameLoaderClient::willCheckAndDispatchPostMessage
1400
1401 2012-01-03  Eric Penner  <epenner@google.com>
1402
1403         [chromium] Prevent crashing due to NULL texture updater.
1404         https://bugs.webkit.org/show_bug.cgi?id=75288
1405
1406         Reviewed by James Robinson.
1407
1408         * platform/graphics/chromium/ContentLayerChromium.cpp:
1409         * platform/graphics/chromium/ContentLayerChromium.h:
1410         * platform/graphics/chromium/ImageLayerChromium.cpp:
1411         * platform/graphics/chromium/ImageLayerChromium.h:
1412
1413 2012-01-03  Shawn Singh  <shawnsingh@chromium.org>
1414
1415         [chromium] CCLayerSorter accidentally reverses order of some layers.
1416         https://bugs.webkit.org/show_bug.cgi?id=75046
1417
1418         Reviewed by James Robinson.
1419
1420         Unit test added to CCLayerSorterTest.cpp
1421
1422         Fixes two related bugs that were causing z-ordering problems in
1423         layers when preserves3D triggers the need for layer sorting.
1424
1425         The first problem was that CCLayerSorter accidentally reversed the
1426         order of layers when there was no sorting dependency between them.
1427
1428         The second problem was that zDiff had numerical precision problems
1429         that forced sorting dependencies that were sometimes incorrect,
1430         when the dependencies should not have existed.
1431
1432         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
1433         (WebCore::CCLayerSorter::checkOverlap):
1434         (WebCore::CCLayerSorter::sort):
1435
1436 2012-01-03  Leo Yang  <leo.yang@torchmobile.com.cn>
1437
1438         [BlackBerry] Add support of blob form data to the BlackBerry port
1439         https://bugs.webkit.org/show_bug.cgi?id=75218
1440
1441         Pass FormDataElement::encodedBlob type of form data to the BlackBerry
1442         platform request to support blob data and blob file range.
1443
1444         Reviewed by George Staikos.
1445
1446         The port can't be built now, no new tests so far.
1447
1448         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
1449         (WebCore::ResourceRequest::initializePlatformRequest):
1450
1451 2012-01-03  Adam Barth  <abarth@webkit.org>
1452
1453         Two null crashes in Treebuilder
1454         https://bugs.webkit.org/show_bug.cgi?id=66101
1455
1456         Reviewed by Eric Seidel.
1457
1458         The underly issue with causing the crash is that we're re-entering the
1459         tree builder.  We've done a bunch of point fixes around tree builder
1460         re-entrancy, but neither the implementation nor the specification are
1461         really designed to handle re-entrancy.
1462
1463         Firefox avoids this problem by putting the parser on its own thread.  I
1464         don't think we're quite ready to do that yet (although we will
1465         eventually, presumably, as computers become ever more parallel).  The
1466         approach in this patch is to queue up the DOM mutations and actually
1467         perform them on a shallower stack.  That's essentially the approach
1468         we've used for executing <scripts>.
1469
1470         This patch queues up DOM modifications and executes them from a clean
1471         call stack, stopping us from re-entering the tree builder.  We might
1472         need to experiment with exactly where to kick off the queue, but this
1473         location seems reasonable and fixes the crash.
1474
1475         Test: fast/parser/re-enter-and-crash.html
1476
1477         * html/parser/HTMLConstructionSite.cpp:
1478         (WebCore::executeTask):
1479             - Add a helper function for actually executing a queue DOM
1480               mutation.
1481         (WebCore::HTMLConstructionSite::attach):
1482             - Instead of actually attaching the element to the DOM, this
1483               function now queues the element for attachment.  In a follow-up
1484               patch, I plan to change this function to return void (and I'll
1485               probably rename it to something that makes it clear that it only
1486               queues the attachment).
1487         (WebCore::HTMLConstructionSite::executeQueuedTasks):
1488         (WebCore::HTMLConstructionSite::insertDoctype):
1489             - Setting the compatmode from the Doctype requires the doctype to
1490               actually be in the DOM, so we need to execute our queued tasks
1491               synchronously.  We can likely improve this function by passing
1492               the Doctype element explicitly in a follow-up patch.
1493         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
1494         (WebCore::HTMLConstructionSite::insertTextNode):
1495         (WebCore::HTMLConstructionSite::findFosterSite):
1496         (WebCore::HTMLConstructionSite::fosterParent):
1497         * html/parser/HTMLConstructionSite.h:
1498         (WebCore::HTMLConstructionSiteTask::HTMLConstructionSiteTask):
1499             - Add a task object that holds on to the relevant elements.  We
1500               define some vector traits for this object to match the traits on
1501               RefPtr (which make Vector operations faster by explaining that
1502               this type is moveable without having to churn reference counts).
1503         * html/parser/HTMLElementStack.cpp:
1504         (WebCore::HTMLElementStack::pushCommon):
1505             - We delay the "begin parsing" call until we actually attach the
1506               element to the DOM.  That splits the responsibility for calling
1507               begin/finished, which is less than ideal, but I didn't see
1508               another solution.
1509         * html/parser/HTMLTreeBuilder.cpp:
1510         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
1511             - Kick off the queued mutations.
1512
1513 2012-01-03  Adam Barth  <abarth@webkit.org>
1514
1515         view-source doesn't colorize </script> correctly
1516         https://bugs.webkit.org/show_bug.cgi?id=62971
1517
1518         Reviewed by Eric Seidel.
1519
1520         The reason these tags weren't colorized correctly was because the
1521         characters for the end tags where consumed by the tokenizer at the same
1522         time as it consumed the text of the script tag.  These characters are
1523         buffered internally by the tokenizer because the tokenizer is searching
1524         for "an appropriate end tag", which is "</script>" in this case.
1525
1526         I tried a number of different approaches to fixing this bug.  The
1527         approach in this patch adds an accessor to the tokenizer to read out
1528         the buffered characters.  This approach makes it easier for the
1529         HTMLSourceTracker to get exactly the right value for these buffered
1530         characters without having to do a complicated simulation of the
1531         buffering itself.
1532
1533         Tests: fast/frames/viewsource-plain-text-tags.html:
1534
1535         * html/parser/HTMLViewSourceParser.cpp:
1536         (WebCore::HTMLViewSourceParser::pumpTokenizer):
1537         * html/parser/HTMLDocumentParser.cpp:
1538         (WebCore::HTMLDocumentParser::pumpTokenizer):
1539           - Give the HTMLSourceTracker a pointer to the tokenizer so it can ask
1540             for the buffered characters.
1541         * html/parser/HTMLSourceTracker.cpp:
1542         (WebCore::HTMLSourceTracker::start):
1543           - The idea here is to treat characters buffered internally by the
1544             tokenizer the same way we treat characters that were contained in a
1545             previous segment of source.  We copy them into our accumulation
1546             buffer and adjust the token base offset to account for the extra
1547             characters.
1548         (WebCore::HTMLSourceTracker::end):
1549           - Don't consier the character buffered by the tokenizer to be part of
1550             the token we've just finished.
1551         (WebCore::HTMLSourceTracker::sourceForToken):
1552           - Remove the assumption that all of the m_previousSource is contained
1553             in the source for the current token.  Because we now understand
1554             that the tokenizer can buffer some characters internally, we might
1555             not exhaust the m_previousSource.
1556         * html/parser/HTMLSourceTracker.h:
1557           - Rename m_sourceFromPreviousSegments to m_previousSource and changed
1558             to a SegementedString to avoid extra mallocs we keep appending tiny
1559             segments.
1560           - Rename m_source to m_currentSource to contrast nicely with
1561             m_previousSource.
1562         * html/parser/HTMLTokenizer.cpp:
1563         (WebCore::HTMLTokenizer::flushBufferedEndTag):
1564         (WebCore::HTMLTokenizer::nextToken):
1565           - Previously, we cleared the temporary buffer lazily when we needed
1566             to add new characters to it.  Now we clear it eagerly so that it's
1567             length tells us whether we're currently using it to store
1568             characters.
1569           - Previously, we weren't storing the character that we used to
1570             terminate the appropriate end tag (e.g., the > in </script>)
1571             because we didn't need to "unbuffer" that character into the
1572             HTMLToken::appendToCharacter.  Now, we do store that character in
1573             the temporary buffer so that the HTMLSourceTracker can see that
1574             character.
1575         (WebCore::HTMLTokenizer::bufferedCharacters):
1576         * html/parser/HTMLTokenizer.h:
1577         (WebCore::HTMLTokenizer::numberOfBufferedCharacters):
1578           - Add accessor methods to copy out the buffered characters.
1579           - Also, unrelated to the rest of this patch, I made the constructor
1580             for HTMLTokenizer explicit because it takes only a single
1581             paramater, per the style guide.
1582         * platform/text/SegmentedString.cpp:
1583         (WebCore::SegmentedString::clear):
1584           - SegmentedString::clear wasn't clearing all of its state.  I don't
1585             think this issue was actually observable, but I noticed it when
1586             working on this patch, so I fixed it.
1587
1588 2012-01-03  Benjamin Poulain  <bpoulain@apple.com>
1589
1590         Exclude Mac's PlatformEventFactory from iOS
1591         https://bugs.webkit.org/show_bug.cgi?id=75493
1592
1593         Reviewed by Sam Weinig.
1594
1595         Move PlatformEventFactory.(h|cpp) to PlatformEventFactoryMac(h|cpp) and exclude the file
1596         from iOS build.
1597
1598         * Configurations/WebCore.xcconfig: Also exclude EventHandlerMac for consistency.
1599         * WebCore.xcodeproj/project.pbxproj:
1600         * page/mac/EventHandlerMac.mm:
1601         * platform/mac/PlatformEventFactoryMac.h: Renamed from Source/WebCore/platform/mac/PlatformEventFactory.h.
1602         * platform/mac/PlatformEventFactoryMac.mm: Renamed from Source/WebCore/platform/mac/PlatformEventFactory.mm.
1603         (WebCore::globalPoint):
1604         (WebCore::globalPointForEvent):
1605         (WebCore::pointForEvent):
1606         (WebCore::mouseButtonForEvent):
1607         (WebCore::mouseEventTypeForEvent):
1608         (WebCore::clickCountForEvent):
1609         (WebCore::momentumPhaseForEvent):
1610         (WebCore::phaseForEvent):
1611         (WebCore::gestureEventTypeForEvent):
1612         (WebCore::textFromEvent):
1613         (WebCore::unmodifiedTextFromEvent):
1614         (WebCore::keyIdentifierForKeyEvent):
1615         (WebCore::isKeypadEvent):
1616         (WebCore::windowsKeyCodeForKeyEvent):
1617         (WebCore::isKeyUpEvent):
1618         (WebCore::modifiersForEvent):
1619         (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
1620         (WebCore::PlatformEventFactory::createPlatformMouseEvent):
1621         (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
1622         (WebCore::PlatformEventFactory::createPlatformWheelEvent):
1623         (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
1624         (WebCore::PlatformEventFactory::createPlatformKeyboardEvent):
1625         (WebCore::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
1626         (WebCore::PlatformEventFactory::createPlatformGestureEvent):
1627
1628 2012-01-03  Wei James  <james.wei@intel.com>
1629
1630         Optimize AudioBufferSourceNode process by avoiding interpolation when pitchRate==1
1631         https://bugs.webkit.org/show_bug.cgi?id=74592
1632
1633         Reviewed by Kenneth Russell.
1634
1635         Covered by existing webaudio layout tests, especially webaudio/audiobuffersource-playbackrate.html
1636
1637         * webaudio/AudioBufferSourceNode.cpp:
1638         (WebCore::AudioBufferSourceNode::renderSilenceAndFinishIfNotLooping):
1639         (WebCore::AudioBufferSourceNode::renderFromBuffer):
1640         * webaudio/AudioBufferSourceNode.h:
1641
1642 2012-01-03  Joseph Pecoraro  <pecoraro@apple.com>
1643
1644         Web Inspector: Access to Node Highlighting info without drawing
1645         https://bugs.webkit.org/show_bug.cgi?id=75504
1646
1647         Provide a "getHighlight" method alongside "drawHighlight" that
1648         gets most of the important node highlighting information. This
1649         can be used by a port to do its own node highlighting or provide
1650         extra content without interfering with the highlight rects.
1651
1652         Reviewed by Timothy Hatcher.
1653
1654         * WebCore.xcodeproj/project.pbxproj:
1655         Privately expose the Highlight struct in DOMNodeHighlighter.h.
1656
1657         * inspector/DOMNodeHighlighter.cpp:
1658         (WebCore::DOMNodeHighlighter::drawHighlight):
1659         (WebCore::DOMNodeHighlighter::getHighlight):
1660         * inspector/DOMNodeHighlighter.h:
1661         Reuse the existing draw code to instead populate
1662         the Highlight struct with the information it is
1663         about to draw, and only draw if there is a context.
1664
1665         * inspector/InspectorController.cpp:
1666         (WebCore::InspectorController::getHighlight):
1667         * inspector/InspectorController.h:
1668         * inspector/InspectorDOMAgent.cpp:
1669         (WebCore::InspectorDOMAgent::getHighlight):
1670         * inspector/InspectorDOMAgent.h:
1671         Get highlight information by going through getHighlight
1672         in InspectorController. This is alongside drawHighlight.
1673
1674 2012-01-03  Shawn Singh  <shawnsingh@chromium.org>
1675
1676         [chromium] Push drawsContent and contentsVisible into accelerated compositor
1677         https://bugs.webkit.org/show_bug.cgi?id=71209
1678
1679         Reviewed by James Robinson.
1680
1681         Tests: compositing/visibility/visibility-simple-canvas2d-layer.html
1682                compositing/visibility/visibility-simple-video-layer.html
1683                compositing/visibility/visibility-simple-webgl-layer.html
1684
1685         Rebaselined compositing/visibility/visibility-image-layers.html
1686
1687         The CSS visibility property was not being properly obeyed by many
1688         specialized layer types in the accelerated compositor. The root of
1689         the problem was that drawsContent and contentsVisible flags were
1690         not properly propagated into the compositor. This patch removes
1691         the drawsContent() callback, and instead makes sure that
1692         drawsContent and contentsVisible are "pushed" through the
1693         accelerated compositor.
1694
1695         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1696         (WebCore::Canvas2DLayerChromium::drawsContent):
1697         * platform/graphics/chromium/ContentLayerChromium.cpp:
1698         * platform/graphics/chromium/ContentLayerChromium.h:
1699         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1700         (WebCore::GraphicsLayerChromium::setDrawsContent):
1701         (WebCore::GraphicsLayerChromium::setContentsVisible):
1702         (WebCore::GraphicsLayerChromium::setContentsToImage):
1703         (WebCore::GraphicsLayerChromium::setContentsToCanvas):
1704         (WebCore::GraphicsLayerChromium::setContentsToMedia):
1705         (WebCore::GraphicsLayerChromium::updateLayerIsDrawable):
1706         (WebCore::GraphicsLayerChromium::setupContentsLayer):
1707         * platform/graphics/chromium/GraphicsLayerChromium.h:
1708         * platform/graphics/chromium/LayerChromium.cpp:
1709         (WebCore::LayerChromium::LayerChromium):
1710         (WebCore::LayerChromium::setIsDrawable):
1711         * platform/graphics/chromium/LayerChromium.h:
1712         (WebCore::LayerChromium::drawsContent):
1713         * platform/graphics/chromium/PluginLayerChromium.h:
1714         * platform/graphics/chromium/TiledLayerChromium.cpp:
1715         (WebCore::TiledLayerChromium::drawsContent):
1716         * platform/graphics/chromium/VideoLayerChromium.h:
1717         * platform/graphics/chromium/WebGLLayerChromium.cpp:
1718         (WebCore::WebGLLayerChromium::drawsContent):
1719         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1720         (WebCore::CCLayerImpl::dumpLayerProperties):
1721
1722 2012-01-03  Shawn Singh  <shawnsingh@chromium.org>
1723
1724         [chromium] Make sure root damage rect gets passed to renderer
1725         https://bugs.webkit.org/show_bug.cgi?id=74893
1726
1727         Reviewed by James Robinson.
1728
1729         Unit test added to CCLayerTreeHostImplTest.cpp
1730
1731         * platform/graphics/chromium/LayerRendererChromium.cpp:
1732         (WebCore::LayerRendererChromium::swapBuffers):
1733         * platform/graphics/chromium/LayerRendererChromium.h:
1734         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1735         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1736         (WebCore::CCLayerTreeHostImpl::swapBuffers):
1737         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1738
1739 2012-01-03  Yuzhu Shen  <yzshen@chromium.org>
1740
1741         v8 binding: npCreateV8ScriptObject() should not returned an existing V8NPObject if the rootObject doesn't match
1742         https://bugs.webkit.org/show_bug.cgi?id=74515
1743
1744         Reviewed by Nate Chapin.
1745
1746         Test: http/tests/plugins/create-v8-script-objects.html
1747
1748         * bindings/v8/NPV8Object.cpp:
1749         (WebCore::freeV8NPObject):
1750         (WebCore::npCreateV8ScriptObject):
1751
1752 2012-01-03  Jon Lee  <jonlee@apple.com>
1753
1754         Leak of WebNotificationClient when page is destroyed
1755         https://bugs.webkit.org/show_bug.cgi?id=74980
1756         <rdar://problem/10611231>
1757
1758         Reviewed by Mark Rowe.
1759
1760         * notifications/NotificationController.cpp:
1761         (WebCore::NotificationController::~NotificationController): Notify the client
1762         that the controller has been destroyed.
1763         * notifications/NotificationPresenter.h: Add notificationControllerDestroyed()
1764         callback to the client interface.
1765
1766 2012-01-03  Alexis Menard  <alexis.menard@openbossa.org>
1767
1768         getComputedStyle for list-style is not implemented.
1769         https://bugs.webkit.org/show_bug.cgi?id=75443
1770
1771         Reviewed by Tony Chang.
1772
1773         Implement getComputedStyle for list-style.
1774
1775         Test: fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html
1776
1777         * css/CSSComputedStyleDeclaration.cpp:
1778         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1779
1780 2012-01-03  Adrienne Walker  <enne@google.com>
1781
1782         [chromium] Remove unneeded content vs. layer space distinction in tiled layers
1783         https://bugs.webkit.org/show_bug.cgi?id=75498
1784
1785         Reviewed by James Robinson.
1786
1787         Long ago, before scrollbars became their own layers, tiled layers had
1788         a distinction between content space (what's mostly called layer space
1789         elsewhere) and layer space (the transformed content space). It seemed
1790         like this transform could get reused for supporting RTL pages, but as
1791         that's not the case, it should be eradicated.
1792
1793         Tiled layers now deal with everything in "layer space", which is a 2d
1794         rectangle starting at (0, 0) in the top left of the layer and
1795         extending to contentBounds() in the bottom right.
1796
1797         As no code actually set the tiler position, this change should be a
1798         no-op.
1799
1800         Test: LayoutTests/compositing/
1801
1802         * platform/graphics/chromium/TiledLayerChromium.cpp:
1803         (WebCore::UpdatableTile::isDirty):
1804         (WebCore::UpdatableTile::clearDirty):
1805         (WebCore::TiledLayerChromium::updateCompositorResources):
1806         (WebCore::TiledLayerChromium::createTile):
1807         (WebCore::TiledLayerChromium::invalidateRect):
1808         (WebCore::TiledLayerChromium::protectTileTextures):
1809         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
1810         (WebCore::TiledLayerChromium::prepareToUpdate):
1811         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
1812         (WebCore::TiledLayerChromium::needsIdlePaint):
1813         (WebCore::TiledLayerChromium::idlePaintRect):
1814         * platform/graphics/chromium/TiledLayerChromium.h:
1815         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
1816         (WebCore::CCLayerTilingData::operator=):
1817         (WebCore::CCLayerTilingData::layerRectToTileIndices):
1818         (WebCore::CCLayerTilingData::tileRect):
1819         * platform/graphics/chromium/cc/CCLayerTilingData.h:
1820         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1821         (WebCore::CCTiledLayerImpl::appendQuads):
1822
1823 2011-12-22  Joseph Pecoraro  <pecoraro@apple.com>
1824
1825         Implement Date and Time Input Value Sanitization
1826         https://bugs.webkit.org/show_bug.cgi?id=59951
1827
1828         Sanitize non-parsable incoming strings to the empty string.
1829
1830         Reviewed by Kent Tamura.
1831
1832         Covered by existing tests.
1833
1834         * html/BaseDateAndTimeInputType.h:
1835         * html/BaseDateAndTimeInputType.cpp:
1836         (WebCore::BaseDateAndTimeInputType::sanitizeValue): check if the
1837         incoming string is valid. If not just return the empty string.
1838
1839 2012-01-03  Julien Chaffraix  <jchaffraix@webkit.org>
1840
1841         RenderLayer::backgroundClipRect should not check parent()
1842         https://bugs.webkit.org/show_bug.cgi?id=73731
1843
1844         Reviewed by Simon Fraser.
1845
1846         Clean-up only, no expected change in behavior.
1847
1848         * rendering/RenderLayer.cpp:
1849         (WebCore::backgroundClipRectForPosition): Changed RenderObject::isPositioned() to
1850         a check for AbsolutePosition for consistency but also as this is equivalent due to:
1851         - the previous check for FixedPosition.
1852         - RenderView, which is positioned, will never goes to this code as it has no parent().
1853
1854         (WebCore::RenderLayer::backgroundClipRect): Removed the parent() check. While at
1855         it, also moved the inline initialization of |backgroundClipRect| to its own function
1856         and removed a |view| check as the associated ASSERT seems to never have been reached.
1857
1858 2012-01-03  Alexey Proskuryakov  <ap@apple.com>
1859
1860         <rdar://problem/10637779> REGRESSION (r102247): Focus ring is not drawn around a button
1861
1862         Rubber-stamped by Dan Bernstein.
1863
1864         * platform/mac/ThemeMac.mm: (WebCore::updateStates): Flip an incorrect conditional, this code
1865         should run on Snow Leopard and Lion.
1866
1867 2012-01-03  Alexis Menard  <alexis.menard@openbossa.org>
1868
1869         getComputedStyle should return shorthands property with the minimum number of sides possible.
1870         https://bugs.webkit.org/show_bug.cgi?id=75434
1871
1872         Reviewed by Tony Chang.
1873
1874         As stated in http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties we should
1875         return shorthands properties with the minimum number of sides possible.
1876
1877         Existing tests have been updated accordingly.
1878
1879         * css/CSSComputedStyleDeclaration.cpp:
1880         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1881         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
1882         * css/CSSComputedStyleDeclaration.h:
1883
1884 2012-01-03  Martin Robinson  <mrobinson@igalia.com>
1885
1886         [GTK] GTK+ 3 theming code does not use the GtkOrientable style class
1887         https://bugs.webkit.org/show_bug.cgi?id=72789
1888
1889         Reviewed by Philippe Normand.
1890
1891         No new tests. Testing GTK+ theming is quite difficult
1892         because no two distributions have the same set of themes.
1893         Current tests prevent regressions.
1894
1895         * platform/gtk/RenderThemeGtk3.cpp:
1896         (WebCore::applySliderStyleContextClasses): Added this helper that
1897         properly handles the orientable style class.
1898         (WebCore::RenderThemeGtk::paintSliderTrack): Use the new helper.
1899         (WebCore::RenderThemeGtk::paintSliderThumb): Ditto.
1900         * platform/gtk/ScrollbarThemeGtk3.cpp:
1901         (WebCore::applyScrollbarStyleContextClasses): Added this helper that
1902         properly handles the orientable style class.
1903         (WebCore::ScrollbarThemeGtk::paintTrackBackground): Use the new helper.
1904         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
1905         (WebCore::ScrollbarThemeGtk::paintThumb): Ditto.
1906         (WebCore::ScrollbarThemeGtk::paintButton): Ditto.
1907
1908 2012-01-03  Florin Malita  <fmalita@google.com>
1909
1910         NULL ptr in WebCore::SVGStyledTransformableElement::animatedLocalTransform
1911         https://bugs.webkit.org/show_bug.cgi?id=75227
1912
1913         Reviewed by Dirk Schulze.
1914
1915         Test: svg/custom/webkit-transform-crash.html
1916
1917         * svg/SVGStyledTransformableElement.cpp:
1918         (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
1919         Add a null-renderer check.
1920
1921 2012-01-03  Alexis Menard  <alexis.menard@openbossa.org>
1922
1923         getComputedStyle for border is not implemented.
1924         https://bugs.webkit.org/show_bug.cgi?id=75319
1925
1926         Reviewed by Tony Chang.
1927
1928         Implement getComputedStyle for border.
1929
1930         fast/css/getComputedStyle/getComputedStyle-border-shorthand.html was extented.
1931
1932         * css/CSSComputedStyleDeclaration.cpp:
1933         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1934
1935 2012-01-03  Alexis Menard  <alexis.menard@openbossa.org>
1936
1937         Sort the WebCore Xcode project file
1938
1939         Reviewed by Dimitri Glazkov.
1940
1941         * WebCore.xcodeproj/project.pbxproj:
1942
1943 2012-01-03  Adrienne Walker  <enne@google.com>
1944
1945         [chromium] Set tiler bounds explicitly rather than growing them
1946         https://bugs.webkit.org/show_bug.cgi?id=75331
1947
1948         Reviewed by James Robinson.
1949
1950         Rather than only growing bounds, make the bounds on the tiler be set
1951         explicitly by TiledLayerChromium. This patch now properly invalidates
1952         regions when the bounds change.
1953
1954         * platform/graphics/chromium/TiledLayerChromium.cpp:
1955         (WebCore::TiledLayerChromium::updateBounds):
1956         (WebCore::TiledLayerChromium::prepareToUpdate):
1957         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
1958         * platform/graphics/chromium/TiledLayerChromium.h:
1959         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
1960         (WebCore::CCLayerTilingData::setBounds):
1961         (WebCore::CCLayerTilingData::bounds):
1962         * platform/graphics/chromium/cc/CCLayerTilingData.h:
1963
1964 2012-01-03  Martin Robinson  <mrobinson@igalia.com>
1965
1966         [GTK] Slider thumb is not centered on the track with the unico theme
1967         https://bugs.webkit.org/show_bug.cgi?id=72802
1968
1969         Reviewed by Philippe Normand.
1970
1971         No new tests. This only applies to certain GTK+ themes.
1972         Existing tests cover the default GTK+ theme.
1973
1974         * platform/gtk/RenderThemeGtk3.cpp:
1975         (WebCore::RenderThemeGtk::paintSliderThumb): Do not resize the
1976         slider thumb by the trough border.
1977
1978 2012-01-03  Adrienne Walker  <enne@google.com>
1979
1980         [chromium] Make tiled layer's tiler always exist
1981         https://bugs.webkit.org/show_bug.cgi?id=75329
1982
1983         Reviewed by James Robinson.
1984
1985         TiledLayerChromium has some awkward code to handle lazily creating the
1986         tiler, including lots of null checks and shadowing the tile size.
1987         Instead, always create the tiler up front. As values change that
1988         invalidate all tiles, reset it rather than clear the pointer.
1989
1990         * platform/graphics/chromium/LayerChromium.cpp:
1991         (WebCore::LayerChromium::setIsNonCompositedContent):
1992         * platform/graphics/chromium/LayerChromium.h:
1993         * platform/graphics/chromium/TiledLayerChromium.cpp:
1994         (WebCore::TiledLayerChromium::TiledLayerChromium):
1995         (WebCore::TiledLayerChromium::cleanupResources):
1996         (WebCore::TiledLayerChromium::setTileSize):
1997         (WebCore::TiledLayerChromium::setBorderTexelOption):
1998         (WebCore::TiledLayerChromium::drawsContent):
1999         (WebCore::TiledLayerChromium::updateCompositorResources):
2000         (WebCore::TiledLayerChromium::setTilingOption):
2001         (WebCore::TiledLayerChromium::pushPropertiesTo):
2002         (WebCore::TiledLayerChromium::setIsNonCompositedContent):
2003         (WebCore::TiledLayerChromium::invalidateRect):
2004         (WebCore::TiledLayerChromium::protectTileTextures):
2005         (WebCore::TiledLayerChromium::prepareToUpdate):
2006         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
2007         (WebCore::TiledLayerChromium::needsIdlePaint):
2008         (WebCore::TiledLayerChromium::idlePaintRect):
2009         * platform/graphics/chromium/TiledLayerChromium.h:
2010         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
2011         (WebCore::CCLayerTilingData::setBorderTexelOption):
2012         * platform/graphics/chromium/cc/CCLayerTilingData.h:
2013         * platform/graphics/gpu/TilingData.cpp:
2014         (WebCore::TilingData::setHasBorderTexels):
2015         * platform/graphics/gpu/TilingData.h:
2016
2017 2012-01-03  Kentaro Hara  <haraken@chromium.org>
2018
2019         Unreviewed. Rebaselined run-bindings-tests results.
2020
2021         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2022         (WebCore::JSTestEventConstructor::destroy):
2023         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2024         (WebCore::JSTestEventConstructor::releaseImplIfNotNull):
2025         * bindings/scripts/test/JS/JSTestInterface.cpp:
2026         (WebCore::JSTestInterface::destroy):
2027         * bindings/scripts/test/JS/JSTestInterface.h:
2028         (WebCore::JSTestInterface::releaseImplIfNotNull):
2029         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2030         (WebCore::JSTestMediaQueryListListener::destroy):
2031         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2032         (WebCore::JSTestMediaQueryListListener::releaseImplIfNotNull):
2033         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2034         (WebCore::JSTestNamedConstructor::destroy):
2035         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2036         (WebCore::JSTestNamedConstructor::releaseImplIfNotNull):
2037         * bindings/scripts/test/JS/JSTestObj.cpp:
2038         (WebCore::JSTestObj::destroy):
2039         * bindings/scripts/test/JS/JSTestObj.h:
2040         (WebCore::JSTestObj::releaseImplIfNotNull):
2041         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2042         (WebCore::JSTestSerializedScriptValueInterface::destroy):
2043         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2044         (WebCore::JSTestSerializedScriptValueInterface::releaseImplIfNotNull):
2045
2046 2012-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2047
2048         [GTK] Fix scrollbars size with GTK+ 3.x
2049         https://bugs.webkit.org/show_bug.cgi?id=75467
2050
2051         Reviewed by Xan Lopez.
2052
2053         * platform/gtk/RenderThemeGtk3.cpp:
2054         (WebCore::getStyleContext): Add the style class for the given
2055         widget type to the GtkWidgetPath when creating GtkStyleContext
2056         objects.
2057
2058 2012-01-03  Alexis Menard  <alexis.menard@openbossa.org>
2059
2060         getComputedStyle for outline is not implemented.
2061         https://bugs.webkit.org/show_bug.cgi?id=75441
2062
2063         Reviewed by Antonio Gomes.
2064
2065         Implement getComputedStyle for outline.
2066
2067         Test: fast/css/getComputedStyle/getComputedStyle-outline-shorthand.html
2068
2069         * css/CSSComputedStyleDeclaration.cpp:
2070         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2071
2072 2012-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2073
2074         [GTK] Use gdk_screen_get_monitor_workarea() when available for screenAvailableRect()
2075         https://bugs.webkit.org/show_bug.cgi?id=75435
2076
2077         Reviewed by Martin Robinson.
2078
2079         * platform/gtk/GtkVersioning.c:
2080         (getScreenCurrentDesktop):
2081         (getScreenWorkArea):
2082         (gdk_screen_get_monitor_workarea): Implement it when GTK+ < 3.3.6.
2083         * platform/gtk/GtkVersioning.h:
2084         * platform/gtk/PlatformScreenGtk.cpp:
2085         (WebCore::screenAvailableRect): Use
2086         gdk_screen_get_monitor_workarea() instead of our own
2087         implementation.
2088
2089 2012-01-02  Kentaro Hara  <haraken@chromium.org>
2090
2091         REGRESSION(r103919): Remove resolve-supplemental.pl from the WebCore target in Xcode
2092         https://bugs.webkit.org/show_bug.cgi?id=75458
2093
2094         Reviewed by Adam Barth.
2095
2096         At r103919, we added resolve-supplemental.pl to WebCore.framework/Resources,
2097         but we should have added it to the project without adding it to any target.
2098         This patch fixes it.
2099
2100         No tests. No change in behavior.
2101
2102         * WebCore.xcodeproj/project.pbxproj:
2103
2104 2012-01-02  Kentaro Hara  <haraken@chromium.org>
2105
2106         Enable the [Supplemental] IDL on GTK/GObject
2107         https://bugs.webkit.org/show_bug.cgi?id=75411
2108
2109         Reviewed by Adam Barth.
2110
2111         This patch enables the [Supplemental] IDL on GObject bindings of GTK
2112         by changing the build flow of bindings/gobject/GNUmakefile.am as follows.
2113
2114         - Previous build flow:
2115             foreach $idl (all IDL files) {
2116                 generate-bindings.pl depends on $idl;
2117                 generate-bindings.pl reads $idl;
2118                 generate-bindings.pl generates .h and .cpp files for $idl;
2119             }
2120
2121         - New build flow (See the discussions in bug 72138 for more details):
2122             resolve-supplemental.pl depends on all IDL files;
2123             resolve-supplemental.pl reads all IDL files;
2124             resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
2125             resolve-supplemental.pl outputs supplemental_dependency.tmp;
2126             foreach $idl (all IDL files) {
2127                 generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
2128                 generate-bindings.pl reads $idl;
2129                 generate-bindings.pl reads supplemental_dependency.tmp;
2130                 generate-bindings.pl generates .h and .cpp files for $idl,
2131                     including all attributes in the IDL files that are implementing $idl;
2132             }
2133
2134         Tests: Confirm that build succeeds.
2135                http/tests/websocket/tests/*
2136
2137         * GNUmakefile.am:
2138         * bindings/gobject/GNUmakefile.am:
2139
2140 2012-01-02  Kentaro Hara  <haraken@chromium.org>
2141
2142         Add resolve-supplemental.pl to project.pbxproj
2143         https://bugs.webkit.org/show_bug.cgi?id=75426
2144
2145         Reviewed by Adam Barth.
2146
2147         We should have added "resolve-supplemental.pl" to build scripts of AppleWebKit
2148         when we enabled the [Supplemental] IDL on AppleWebKit at r103519.
2149         This is a follow-up patch for it.
2150
2151         No tests. Just confirm that the AppleWebKit build passes.
2152
2153         * WebCore.xcodeproj/project.pbxproj:
2154
2155 2012-01-02  Kentaro Hara  <haraken@chromium.org>
2156
2157         Add resolve-supplemental.pl to build scripts of AppleWin
2158         https://bugs.webkit.org/show_bug.cgi?id=75412
2159
2160         Reviewed by Adam Barth.
2161
2162         We should have added "resolve-supplemental.pl" to build scripts of AppleWin
2163         when we enabled the [Supplemental] IDL on AppleWin at r103519.
2164         This is a follow-up patch for it.
2165
2166         No tests. Just confirm that the AppleWin build passes.
2167
2168         * WebCore.vcproj/MigrateScripts:
2169         * WebCore.vcproj/WebCore.vcproj:
2170
2171 2012-01-02  Sam Weinig  <sam@webkit.org>
2172
2173         Fix the build.
2174
2175         * bindings/scripts/CodeGeneratorJS.pm:
2176
2177 2012-01-02  Andy Estes  <aestes@apple.com>
2178
2179         Fix the Windows build after r103888.
2180
2181         * WebCore.vcproj/WebCore.vcproj: Remove CollectionCache.{cpp, h} from
2182         the WebCore vcproj.
2183
2184 2012-01-02  Sam Weinig  <sam@webkit.org>
2185
2186         REGRESSION(r100517): We're leaking many, many DOM objects!
2187         https://bugs.webkit.org/show_bug.cgi?id=75451
2188
2189         Reviewed by Mark Rowe.
2190
2191         * bindings/scripts/CodeGeneratorJS.pm:
2192         Add a temporary workaround to the problem of handle finalizers
2193         not getting called by adding back the destructors (or rather
2194         their replacement, destroy() functions).
2195
2196 2012-01-02  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2197
2198         Fix chromium mac build after r103905
2199         https://bugs.webkit.org/show_bug.cgi?id=75436
2200
2201         Reviewed by Csaba Osztrogonác.
2202
2203         Adding parenthesis to disambiguate because clang gives error
2204         "expression is not assignable".
2205
2206         * rendering/svg/RenderSVGResourceGradient.cpp:
2207         (WebCore::RenderSVGResourceGradient::applyResource):
2208
2209 2011-12-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2210
2211         Use HashMap<OwnPtr> in RenderSVGResourceGradient
2212         https://bugs.webkit.org/show_bug.cgi?id=75364
2213
2214         Reviewed by Daniel Bates.
2215
2216         * rendering/svg/RenderSVGResourceGradient.cpp:
2217         (WebCore::RenderSVGResourceGradient::removeAllClientsFromCache):
2218         (WebCore::RenderSVGResourceGradient::removeClientFromCache):
2219         (WebCore::RenderSVGResourceGradient::applyResource): avoid looking
2220         up the hash twice by using HashMap::add().
2221         * rendering/svg/RenderSVGResourceGradient.h: rename m_gradient to m_gradientMap.
2222
2223 2012-01-02  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2224
2225         [Qt] Fix qmake warning about unescaped backslashes
2226
2227         Reviewed by Ossy.
2228
2229         * DerivedSources.pri:
2230
2231 2012-01-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2232
2233         Unreviewed. Fix make distcheck issue.
2234
2235         * GNUmakefile.am: Add resolve-supplemental.pl script to
2236         EXTRA_DIST.
2237
2238 2012-01-01  Andreas Kling  <awesomekling@apple.com>
2239
2240         Clear HTMLCollection's internal cache on construction.
2241         <http://webkit.org/b/75423>
2242
2243         Reviewed by Antti Koivisto.
2244
2245         * html/HTMLCollection.h:
2246         * html/HTMLCollection.cpp:
2247         (WebCore::HTMLCollection::HTMLCollection):
2248         (WebCore::HTMLCollection::invalidateCacheIfNeeded):
2249
2250 2012-01-01  Eunmi Lee  <eunmi15.lee@samsung.com>
2251
2252         [EFL] Move function to get dpi to the WebCore/platform/efl/EflScreenUtilities.cpp.
2253         https://bugs.webkit.org/show_bug.cgi?id=75292
2254
2255         Reviewed by Andreas Kling.
2256
2257         Move ewk_util_dpi_get() function in the ewk_util.cpp to the
2258         WebCore/platform/efl/EflScreenUtilities.cpp in order to use it in the WebKit2.
2259         The function's name is changed to getDPI().
2260
2261         * PlatformEfl.cmake:
2262         * platform/efl/EflScreenUtilities.cpp: Added.
2263         (WebCore::getDPI):
2264         * platform/efl/EflScreenUtilities.h: Added.
2265
2266 2012-01-01  Andreas Kling  <awesomekling@apple.com>
2267
2268         Merge CollectionCache into HTMLCollection.
2269         <http://webkit.org/b/75423>
2270
2271         Reviewed by Anders Carlsson.
2272
2273         - Move the members of CollectionCache into HTMLCollection.
2274         - Renamed resetCollectionInfo() to invalidateCacheIfNeeded().
2275         - Removed a bunch of overkill HashMap::checkConsistency() calls.
2276
2277         * CMakeLists.txt:
2278         * GNUmakefile.list.am:
2279         * Target.pri:
2280         * WebCore.gypi:
2281         * WebCore.xcodeproj/project.pbxproj:
2282         * html/CollectionCache.cpp: Removed.
2283         * html/CollectionCache.h: Removed.
2284
2285             Remove CollectionCache.
2286
2287         * html/HTMLAllCollection.cpp:
2288         (WebCore::HTMLAllCollection::namedItemWithIndex):
2289         * html/HTMLCollection.cpp:
2290         (WebCore::HTMLCollection::HTMLCollection):
2291         (WebCore::HTMLCollection::~HTMLCollection):
2292         (WebCore::HTMLCollection::invalidateCacheIfNeeded):
2293         (WebCore::HTMLCollection::length):
2294         (WebCore::HTMLCollection::item):
2295         (WebCore::HTMLCollection::nextItem):
2296         (WebCore::HTMLCollection::namedItem):
2297         (WebCore::HTMLCollection::updateNameCache):
2298         (WebCore::HTMLCollection::hasNamedItem):
2299         (WebCore::HTMLCollection::namedItems):
2300         (WebCore::HTMLCollection::append):
2301         * html/HTMLCollection.h:
2302         * html/HTMLFormCollection.cpp:
2303         (WebCore::HTMLFormCollection::item):
2304         (WebCore::HTMLFormCollection::getNamedItem):
2305         (WebCore::HTMLFormCollection::nextItem):
2306         (WebCore::HTMLFormCollection::namedItem):
2307         (WebCore::HTMLFormCollection::updateNameCache):
2308
2309             HTMLCollection's m_info and info() become "struct m_cache" (protected.)
2310
2311         * html/HTMLOptionsCollection.cpp:
2312         * html/HTMLOptionsCollection.h:
2313         * html/HTMLSelectElement.cpp:
2314         (WebCore::HTMLSelectElement::setRecalcListItems):
2315
2316             Expose HTMLCollection::invalidateCacheIfNeeded() so we can call it from
2317             HTMLSelectElement::setRecalcListItems().
2318
2319         * html/HTMLFormCollection.h:
2320
2321             Remove stale declaration of formCollectionInfo() which no longer exists.
2322
2323 2012-01-01  Andreas Kling  <awesomekling@apple.com>
2324
2325         Move the remaining collections to caching on their respective base nodes.
2326         <http://webkit.org/b/75416>
2327
2328         Reviewed by Anders Carlsson.
2329
2330         Add a (lazily-allocated) array of HTMLCollections to ElementRareData and cache
2331         the various collections on their base node rather than recreating them every time.
2332
2333         Test: fast/dom/collection-idempotence.html
2334               fast/dom/gc-9.html
2335
2336         * html/CollectionType.h:
2337         * dom/ElementRareData.h:
2338         (WebCore::ElementRareData::hasCachedHTMLCollections):
2339         (WebCore::ElementRareData::cachedHTMLCollection):
2340         (WebCore::ElementRareData::ensureCachedHTMLCollection):
2341         * dom/Element.h:
2342         * dom/Element.cpp:
2343         (WebCore::Element::ensureCachedHTMLCollection):
2344
2345             Plumbing to cache HTMLCollections on ElementRareData.
2346
2347         (WebCore::Element::~Element):
2348
2349             Detach any cached collections from an element when it's destroyed.
2350
2351         * html/HTMLCollection.h:
2352         * html/HTMLCollection.cpp:
2353         (WebCore::HTMLCollection::HTMLCollection):
2354         (WebCore::HTMLCollection::create):
2355         (WebCore::HTMLCollection::~HTMLCollection):
2356         (WebCore::HTMLCollection::detachFromNode):
2357         * html/HTMLTableRowsCollection.cpp:
2358         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
2359         * html/HTMLOptionsCollection.cpp:
2360         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
2361         * html/HTMLFormCollection.cpp:
2362         (WebCore::HTMLFormCollection::HTMLFormCollection):
2363         * dom/Document.cpp:
2364         (WebCore::Document::cachedCollection):
2365
2366             Consolidate the HTMLCollection constructors and get rid of the hacks to
2367             optionally retain the base node.
2368
2369         * html/HTMLDataListElement.cpp:
2370         (WebCore::HTMLDataListElement::options):
2371         * html/HTMLElement.cpp:
2372         (WebCore::HTMLElement::children):
2373         * html/HTMLMapElement.cpp:
2374         (WebCore::HTMLMapElement::areas):
2375         * html/HTMLTableElement.cpp:
2376         (WebCore::HTMLTableElement::tBodies):
2377         * html/HTMLTableRowElement.cpp:
2378         (WebCore::HTMLTableRowElement::cells):
2379         * html/HTMLTableSectionElement.cpp:
2380         (WebCore::HTMLTableSectionElement::rows):
2381
2382             Cached collections!
2383
2384 2012-01-01  Raymond Liu  <raymond.liu@intel.com>
2385
2386         Use overload methods to implement [Optional] parameters in AudioNode.idl
2387         https://bugs.webkit.org/show_bug.cgi?id=75402
2388
2389         Reviewed by Adam Barth.
2390
2391         No new tests required.
2392
2393         * GNUmakefile.list.am:
2394         * UseV8.cmake:
2395         * WebCore.gypi:
2396         * WebCore.xcodeproj/project.pbxproj:
2397         * bindings/js/JSAudioNodeCustom.cpp: Removed.
2398         * bindings/v8/custom/V8AudioNodeCustom.cpp: Removed.
2399         * webaudio/AudioNode.cpp:
2400         (WebCore::AudioNode::connect):
2401         (WebCore::AudioNode::disconnect):
2402         * webaudio/AudioNode.h:
2403         * webaudio/AudioNode.idl:
2404
2405 2011-12-20  Robert Hogan  <robert@webkit.org>
2406
2407         CSS 2.1 failure: border-collapse-offset-002.htm fails
2408         https://bugs.webkit.org/show_bug.cgi?id=71705
2409
2410         Reviewed by Julien Chaffraix.
2411
2412         Tests: css2.1/20110323/border-collapse-offset-002-expected.html
2413                fast/css/caption-width-absolute-position-offset-top.htm
2414                fast/css/caption-width-absolute-position.htm
2415                fast/css/caption-width-fixed-position-offset-top.htm
2416                fast/css/caption-width-fixed-position.htm
2417                fast/css/caption-width-relative-position-offset-top.htm
2418                fast/css/caption-width-relative-position.htm
2419
2420         Table captions are implemented as children of the table but have a special
2421         requirement to expand to the full width of the table rather than just the 'available'
2422         width, i.e. the full width minus padding and borders.
2423
2424         To accomodate this create a RenderTableCaption object that reimplements containingBlockLogicalWidthForContent()
2425         to return the full width of the containing block (i.e. the table) rather than the available width.
2426
2427
2428         * CMakeLists.txt: Add RenderTableCaption.[cpp|h]
2429         * GNUmakefile.list.am: Add RenderTableCaption.[cpp|h]
2430         * Target.pri: Add RenderTableCaption.[cpp|h]
2431         * WebCore.gypi: Add RenderTableCaption.[cpp|h]
2432         * WebCore.vcproj/WebCore.vcproj: Add RenderTableCaption.[cpp|h]
2433         * WebCore.xcodeproj/project.pbxproj: Add RenderTableCaption.[cpp|h]
2434         * rendering/RenderBlock.cpp:
2435         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Use RenderTableCaption
2436         * rendering/RenderObject.cpp:
2437         (WebCore::RenderObject::createObject): Add RenderTableCaption.[cpp|h]
2438         (WebCore::RenderObject::addChild): ditto
2439         * rendering/RenderObject.h:
2440         (WebCore::RenderObject::isTableCaption):
2441         * rendering/RenderTable.cpp:
2442         (WebCore::RenderTable::addChild):
2443         * rendering/RenderTable.h:
2444         * rendering/RenderTableCaption.cpp: Added.
2445         (WebCore::RenderTableCaption::RenderTableCaption): Implement RenderTableCaption
2446         (WebCore::RenderTableCaption::~RenderTableCaption):
2447         (WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Return the containing block's full width rather than it's available width.
2448         * rendering/RenderTableCaption.h: Added.
2449         (WebCore::RenderTableCaption::isTableCaption):
2450         (WebCore::toRenderTableCaption):
2451         * rendering/RenderingAllInOne.cpp:
2452
2453 2012-01-01  Kentaro Hara  <haraken@chromium.org>
2454
2455         Unreviewed. Rebaselined run-bindings-tests results.
2456
2457         * bindings/scripts/test/CPP/WebDOMTestSupplemental.cpp: Added.
2458         * bindings/scripts/test/CPP/WebDOMTestSupplemental.h: Added.
2459         * bindings/scripts/test/GObject/WebKitDOMTestSupplemental.cpp: Added.
2460         * bindings/scripts/test/GObject/WebKitDOMTestSupplemental.h: Added.
2461         * bindings/scripts/test/ObjC/DOMTestSupplemental.cpp: Added.
2462         * bindings/scripts/test/ObjC/DOMTestSupplemental.h: Added.
2463
2464 2012-01-01  Andreas Kling  <awesomekling@apple.com>
2465
2466         Make HTMLCollections play nice after their base node is gone.
2467         <http://webkit.org/b/75410>
2468
2469         Reviewed by Anders Carlsson.
2470
2471         Added HTMLCollection::detachFromNode() and call that from destructors of nodes
2472         with cached collections.
2473
2474         Sprinkled checks/assertions where applicable to make sure HTMLCollections are
2475         empty after their associated node has been destroyed.
2476
2477         This is a slight change in behavior, as collections would previously keep
2478         their nodes alive indefinitely. Added a test to document this.
2479
2480         Test: fast/dom/htmlcollection-zombies.html
2481
2482         * dom/Document.cpp:
2483         (WebCore::Document::~Document):
2484         * html/HTMLAllCollection.cpp:
2485         (WebCore::HTMLAllCollection::namedItemWithIndex):
2486         * html/HTMLCollection.cpp:
2487         (WebCore::HTMLCollection::detachFromNode):
2488         (WebCore::HTMLCollection::resetCollectionInfo):
2489         (WebCore::HTMLCollection::itemAfter):
2490         (WebCore::HTMLCollection::calcLength):
2491         (WebCore::HTMLCollection::length):
2492         (WebCore::HTMLCollection::item):
2493         (WebCore::HTMLCollection::nextItem):
2494         (WebCore::HTMLCollection::namedItem):
2495         (WebCore::HTMLCollection::updateNameCache):
2496         (WebCore::HTMLCollection::hasNamedItem):
2497         (WebCore::HTMLCollection::namedItems):
2498         (WebCore::HTMLCollection::tags):
2499         * html/HTMLCollection.h:
2500         * html/HTMLFormCollection.cpp:
2501         (WebCore::HTMLFormCollection::calcLength):
2502         (WebCore::HTMLFormCollection::item):
2503         (WebCore::HTMLFormCollection::getNamedItem):
2504         (WebCore::HTMLFormCollection::getNamedFormItem):
2505         (WebCore::HTMLFormCollection::namedItem):
2506         (WebCore::HTMLFormCollection::updateNameCache):
2507         * html/HTMLFormElement.cpp:
2508         (WebCore::HTMLFormElement::~HTMLFormElement):
2509         * html/HTMLNameCollection.cpp:
2510         (WebCore::HTMLNameCollection::itemAfter):
2511         * html/HTMLOptionsCollection.cpp:
2512         (WebCore::HTMLOptionsCollection::add):
2513         (WebCore::HTMLOptionsCollection::remove):
2514         (WebCore::HTMLOptionsCollection::selectedIndex):
2515         (WebCore::HTMLOptionsCollection::setSelectedIndex):
2516         (WebCore::HTMLOptionsCollection::setLength):
2517         * html/HTMLPropertiesCollection.cpp:
2518         (WebCore::HTMLPropertiesCollection::length):
2519         (WebCore::HTMLPropertiesCollection::item):
2520         (WebCore::HTMLPropertiesCollection::names):
2521         * html/HTMLSelectElement.cpp:
2522         (WebCore::HTMLSelectElement::~HTMLSelectElement):
2523         * html/HTMLSelectElement.h:
2524         * html/HTMLTableElement.cpp:
2525         (WebCore::HTMLTableElement::~HTMLTableElement):
2526         * html/HTMLTableElement.h:
2527         * html/HTMLTableRowsCollection.cpp:
2528         (WebCore::HTMLTableRowsCollection::itemAfter):
2529
2530 2012-01-01  Andreas Kling  <awesomekling@apple.com>
2531
2532         HTMLCollection: Remove the constructor's custom CollectionCache* argument.
2533         <http://webkit.org/b/75414>
2534
2535         Reviewed by Anders Carlsson.
2536
2537         We no longer need to initialize HTMLCollections with a custom CollectionCache,
2538         so remove the argument from the constructor.
2539
2540         * html/HTMLCollection.cpp:
2541         (WebCore::HTMLCollection::HTMLCollection):
2542         * html/HTMLCollection.h:
2543         * html/HTMLFormCollection.cpp:
2544         (WebCore::HTMLFormCollection::HTMLFormCollection):
2545         * html/HTMLNameCollection.cpp:
2546         (WebCore::HTMLNameCollection::HTMLNameCollection):
2547         * html/HTMLOptionsCollection.cpp:
2548         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
2549         * html/HTMLTableRowsCollection.cpp:
2550         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
2551
2552 2011-12-31  Dan Bernstein  <mitz@apple.com>
2553
2554         WebCore changes for: REGRESSION (WebKit2): Cursor, hover states not updated when page scrolls under stationary mouse pointer
2555         https://bugs.webkit.org/show_bug.cgi?id=75405
2556
2557         Reviewed by Anders Carlsson.
2558
2559         Test: fast/events/frame-scroll-fake-mouse-move.html
2560
2561         * page/FrameView.cpp:
2562         (WebCore::FrameView::scrollPositionChanged): Added a call to
2563         EventHandler::dispatchFakeMouseMoveEventSoon().
2564
2565 2012-01-01  Andreas Kling  <awesomekling@apple.com>
2566
2567         Cache named item collections on Document, not just their caches.
2568         <http://webkit.org/b/75403>
2569
2570         Reviewed by Anders Carlsson.
2571
2572         Keep two maps of name -> RefPtr<HTMLNameCollection> on Document. We already
2573         had maps for the CollectionCaches and were creating the HTMLNameCollections
2574         every time they were accessed. We now let the collections create and manage
2575         the CollectionCaches instead of Document.
2576
2577         No new tests since these collections are not exposed to the web.
2578
2579         * dom/Document.h:
2580         * dom/Document.cpp:
2581         (WebCore::Document::windowNamedItems):
2582         (WebCore::Document::documentNamedItems):
2583
2584             Replace the name/CollectionCache maps by name/HTMLNameCollection maps.
2585
2586         * bindings/js/JSDOMWindowCustom.cpp:
2587         (WebCore::namedItemGetter):
2588         * bindings/js/JSHTMLDocumentCustom.cpp:
2589         (WebCore::JSHTMLDocument::nameGetter):
2590
2591             Pass names as AtomicStrings to Document's collection getters.
2592
2593         * html/HTMLNameCollection.h:
2594         (WebCore::HTMLNameCollection::create):
2595         * html/HTMLNameCollection.cpp:
2596         (WebCore::HTMLNameCollection::HTMLNameCollection):
2597
2598             Store the name in an AtomicString instead of a String, incidentally
2599             making traversal of HTMLNameCollections more efficient.
2600
2601         * html/CollectionType.h:
2602
2603             Remove two now-unneeded constants.
2604
2605 2012-01-01  Andreas Kling  <awesomekling@apple.com>
2606
2607         Remove Document::collectionInfo() and let collections manage their caches.
2608         <http://webkit.org/b/75401>
2609
2610         Reviewed by Anders Carlsson.
2611
2612         Remove the CollectionCaches from Document and have the document's collections
2613         create and manage the caches on-demand instead. This is a step towards merging
2614         CollectionCache into HTMLCollection.
2615
2616         * dom/Document.h:
2617         * dom/Document.cpp:
2618         * html/HTMLCollection.cpp:
2619         (WebCore::HTMLCollection::HTMLCollection):
2620         * html/HTMLOptionsCollection.cpp:
2621
2622 2012-01-01  Andreas Kling  <awesomekling@apple.com>
2623
2624         RenderThemeMac: Avoid double hash lookup in systemColor().
2625         <http://webkit.org/b/75409>
2626
2627         Reviewed by Anders Carlsson.
2628
2629         * rendering/RenderThemeMac.mm:
2630         (WebCore::RenderThemeMac::systemColor):
2631
2632 2012-01-01  Andreas Kling  <awesomekling@apple.com>
2633
2634         CSSStyleSelector: Avoid double hash lookup in keyframeStylesForAnimation().
2635         <http://webkit.org/b/75408>
2636
2637         Reviewed by Anders Carlsson.
2638
2639         * css/CSSStyleSelector.cpp:
2640         (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
2641
2642 2012-01-01  Andreas Kling  <awesomekling@apple.com>
2643
2644         KeyframeAnimation: Use hash lookups to determine if property is animated.
2645         <http://webkit.org/b/75407>
2646
2647         Reviewed by Anders Carlsson.
2648
2649         Clean out an old FIXME about using hash lookups instead of iterating over
2650         the properties.
2651
2652         * page/animation/KeyframeAnimation.cpp:
2653         (WebCore::KeyframeAnimation::hasAnimationForProperty):
2654         (WebCore::KeyframeAnimation::affectsProperty):
2655
2656 2011-12-31  Dan Bernstein  <mitz@apple.com>
2657
2658         WebCore change for <rdar://problem/10463059> Cannot print USPS shipping labels
2659         http://webkit.org/b/72801
2660
2661         Reviewed by Anders Carlsson and Alexey Proskuryakov.
2662
2663         * WebCore.exp.in: Exported Chrome::print().
2664
2665 2011-12-31  Dan Bernstein  <mitz@apple.com>
2666
2667         WebCore changes for <rdar://problem/8750356> REGRESSION (WebKit2): Printing a subframe containing a PDF prints the on-screen view instead of the entire PDF document
2668         <http://webkit.org/b/75232>
2669
2670         Reviewed by Alexey Proskuryakov.
2671
2672         * WebCore.exp.in: Exported PluginDocument::pluginWidget().
2673         * WebCore.xcodeproj/project.pbxproj: Promoted PluginDocument.h to private.
2674         * html/PluginDocument.h: Fixed a typo in a comment.
2675
2676 2011-12-30  Andreas Kling  <awesomekling@apple.com>
2677
2678         Cache and reuse the HTMLTableElement.rows collection.
2679         <http://webkit.org/b/75398>
2680
2681         Reviewed by Anders Carlsson.
2682
2683         Let HTMLTableElement::rows() cache the returned collection and tie it to the
2684         lifetime of the form.
2685
2686         Test: fast/dom/table-rows-collection-idempotence.html
2687               fast/dom/gc-9.html
2688
2689         * html/HTMLTableElement.h:
2690         * html/HTMLTableElement.cpp:
2691         (WebCore::HTMLTableElement::rows):
2692
2693             Cache the HTMLTableRowsCollection returned by rows() on the HTMLTableElement.
2694             Remove the per-table CollectionCache and let the collection manage that.
2695
2696         * html/HTMLTableRowsCollection.h:
2697         * html/HTMLTableRowsCollection.cpp:
2698         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
2699         (WebCore::HTMLTableRowsCollection::create):
2700
2701             Tell the base class constructor to not retain the back-pointer to the table.
2702
2703 2011-12-30  Andreas Kling  <awesomekling@apple.com>
2704
2705         Cache and reuse the HTMLSelectElement.options collection.
2706         <http://webkit.org/b/75399>
2707
2708         Reviewed by Anders Carlsson.
2709
2710         Let HTMLSelectElement::options() cache the returned collection and tie it to the
2711         lifetime of the form. This shrinks HTMLSelectElement by sizeof(CollectionCache)
2712         minus one pointer.
2713
2714         Test: fast/dom/select-options-collection-idempotence.html
2715               fast/gc-9.html
2716
2717         * html/HTMLSelectElement.h:
2718         * html/HTMLSelectElement.cpp:
2719         (WebCore::HTMLSelectElement::options):
2720
2721             Cache the HTMLOptionsCollection returned by options() on the HTMLSelectElement.
2722             Remove the per-select CollectionCache and let the collection manage that.
2723
2724         * html/HTMLOptionsCollection.h:
2725         * html/HTMLOptionsCollection.cpp:
2726         (WebCore::HTMLOptionsCollection::create):
2727         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
2728
2729             Tell the base class constructor to not retain the back-pointer to the element.
2730
2731         * html/HTMLSelectElement.cpp:
2732         (WebCore::HTMLSelectElement::setRecalcListItems):
2733         * html/HTMLOptionsCollection.cpp:
2734         (WebCore::HTMLOptionsCollection::invalidateCache):
2735
2736             Added so HTMLSelectElement can invalidate the collection without triggering
2737             unnecessary instantiation of a CollectionCache.
2738
2739 2011-12-30  Kentaro Hara  <haraken@chromium.org>
2740
2741         Enable the [Supplemental] IDL on CMake
2742         https://bugs.webkit.org/show_bug.cgi?id=75345
2743
2744         Reviewed by Daniel Bates.
2745
2746         This patch enables the [Supplemental] IDL on CMake by changing the build
2747         flow of CMake as follows.
2748
2749         - Previous build flow:
2750             foreach $idl (all IDL files) {
2751                 generate-bindings.pl depends on $idl;
2752                 generate-bindings.pl reads $idl;
2753                 generate-bindings.pl generates .h and .cpp files for $idl;
2754             }
2755
2756         - New build flow (See the discussions in bug 72138 for more details):
2757             resolve-supplemental.pl depends on all IDL files;
2758             resolve-supplemental.pl reads all IDL files;
2759             resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
2760             resolve-supplemental.pl outputs supplemental_dependency.tmp;
2761             foreach $idl (all IDL files) {
2762                 generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
2763                 generate-bindings.pl reads $idl;
2764                 generate-bindings.pl reads supplemental_dependency.tmp;
2765                 generate-bindings.pl generates .h and .cpp files for $idl,
2766                     including all attributes in the IDL files that are implementing $idl;
2767             }
2768
2769         Tests: Confirm that build succeeds.
2770                http/tests/websocket/tests/*
2771
2772         * CMakeLists.txt:
2773         * UseJSC.cmake: Modified to reflect the new build flow as described above.
2774         * UseV8.cmake: Ditto.
2775
2776 2011-12-30  Robert Hogan  <robert@webkit.org>
2777
2778         REGRESSION (r94492): Text is shifted to the right in some buttons in the Mac App Store
2779         https://bugs.webkit.org/show_bug.cgi?id=74723
2780
2781         Reviewed by Dan Bernstein.
2782
2783         Tests: fast/css/absolute-inline-alignment-2.html
2784                fast/css/absolute-inline-alignment.html
2785
2786         Inline positioned elements in the leading spaces of an inline run need to align to 
2787         adjacent text, so add them to the run as they're encountered.
2788
2789         * rendering/RenderBlockLineLayout.cpp:
2790         (WebCore::LineInfo::LineInfo): Keep a count of positioned objects encountered when
2791          skipping leading whitespace.
2792         (WebCore::LineInfo::runsFromLeadingWhitespace):
2793         (WebCore::LineInfo::resetRunsFromLeadingWhitespace):
2794         (WebCore::LineInfo::incrementRunsFromLeadingWhitespace):
2795         (WebCore::RenderBlock::constructLine): Leading positioned objects should not be considered
2796          when deciding the number of runs in a line. Otherwise they would contribute towards line 
2797          height themselves and prevent a free-standing BR following the positioned object from providing a full 
2798          20px of height.
2799         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Since a run containing line-breaks will enter
2800          skipLeadingWhitespace for each new line we reset the count every time so that the count of positioned
2801          objects we encounter only affects the line they appear on. This case is covered by 
2802          fast/inline/styledEmptyInlinesWithBRs.html
2803         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace): Add a run for each inline positioned object
2804          encountered in leading white space. Keep a count of them so that they can be excluded from
2805          the total number of runs in constructLine. 
2806
2807 2011-12-30  Raymond Liu  <raymond.liu@intel.com>
2808
2809         Remove unnecessary [Custom] attribute in CanvasRenderingContext2D.idl
2810         https://bugs.webkit.org/show_bug.cgi?id=75376
2811
2812         Reviewed by Adam Barth.
2813
2814         No new tests required.
2815
2816         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2817         * html/canvas/CanvasRenderingContext2D.idl:
2818
2819 2011-12-30  Andreas Kling  <awesomekling@apple.com>
2820
2821         Cache and reuse the HTMLFormElement.elements collection.
2822         <http://webkit.org/b/75375>
2823
2824         Reviewed by Anders Carlsson.
2825
2826         Let HTMLFormElement::elements() cache the returned collection and tie it to the
2827         lifetime of the form. This reduces memory consumption by ~70 kB (on 64-bit) when
2828         viewing your average popular post on reddit.com.
2829
2830         Test: fast/dom/form-elements-collection-idempotence.html
2831               fast/dom/gc-9.html
2832
2833         * html/HTMLFormElement.h:
2834         * html/HTMLFormElement.cpp:
2835         (WebCore::HTMLFormElement::elements):
2836
2837             Cache the HTMLFormCollection returned by elements() on the HTMLFormElement.
2838             Remove the per-form CollectionCache and let the collection manage that.
2839
2840         * html/HTMLCollection.h:
2841         * html/HTMLCollection.cpp:
2842         (WebCore::HTMLCollection::HTMLCollection):
2843         (WebCore::HTMLCollection::create):
2844
2845             Have the HTMLCollection constructor take a bool argument that decides whether
2846             we retain the base node pointer or not. This mechanism is a temporary measure
2847             until all collection types are owned by their respective base nodes.
2848
2849         * html/HTMLFormCollection.h:
2850         * html/HTMLFormCollection.cpp:
2851         (WebCore::HTMLFormCollection::HTMLFormCollection):
2852         (WebCore::HTMLFormCollection::create):
2853
2854             Tell the base class constructor to not retain the back-pointer to the form.
2855
2856 2011-12-30  Andreas Kling  <awesomekling@apple.com>
2857
2858         Unreviewed buildfix after r103841.
2859
2860         * inspector/InspectorMemoryAgent.cpp:
2861
2862 2011-12-30  Andreas Kling  <awesomekling@apple.com>
2863
2864         CSSStyleDeclaration: Only allow setting parent rule at construction.
2865         <http://webkit.org/b/75391>
2866
2867         Reviewed by Dan Bernstein.
2868
2869         A CSSStyleDeclaration should only ever belong to one CSSRule. Enforce this
2870         at compile-time by replacing setParentRule(CSSRule*) with clearParentRule().
2871
2872         * css/CSSFontFaceRule.cpp:
2873         (WebCore::CSSFontFaceRule::~CSSFontFaceRule):
2874         * css/CSSStyleDeclaration.h:
2875         (WebCore::CSSStyleDeclaration::clearParentRule):
2876         * css/CSSStyleRule.cpp:
2877         (WebCore::CSSStyleRule::~CSSStyleRule):
2878         * css/WebKitCSSKeyframeRule.cpp:
2879         (WebCore::WebKitCSSKeyframeRule::~WebKitCSSKeyframeRule):
2880
2881 2011-12-30  Andreas Kling  <awesomekling@apple.com>
2882
2883         WebKitCSSKeyframeRule.style.parentRule should point to the keyframe rule.
2884         <http://webkit.org/b/75336>
2885
2886         Reviewed by Antti Koivisto.
2887
2888         Let CSS animation keyframe rules .style.parentRule point back to the keyframe
2889         board, rather than the keyframes rule containing it.
2890
2891         Test: fast/css/css-keyframe-style-parentRule.html
2892
2893         * css/CSSParser.cpp:
2894         (WebCore::CSSParser::createKeyframeRule):
2895         * css/WebKitCSSKeyframeRule.cpp:
2896         (WebCore::WebKitCSSKeyframeRule::setDeclaration):
2897
2898             Set the CSSMutableStyleDeclaration's parent rule when creating it instead
2899             of in WebKitCSSKeyframeRule::setDeclaration(). Add assertion to make sure
2900             it's only called with declarations already parented to the keyframe rule.
2901
2902         * css/WebKitCSSKeyframesRule.cpp:
2903         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
2904         (WebCore::WebKitCSSKeyframesRule::append):
2905         (WebCore::WebKitCSSKeyframesRule::deleteRule):
2906
2907             Stop reparenting keyframe rules' style declarations to the keyframes rule.
2908
2909 2011-12-30  Yury Semikhatsky  <yurys@chromium.org>
2910
2911         Web Inspector: use typed front-end API in the memory agent
2912         https://bugs.webkit.org/show_bug.cgi?id=75382
2913
2914         Memory agent now uses generate C++ API for communicating to the front-end.
2915
2916         Reviewed by Pavel Feldman.
2917
2918         * inspector/InspectorMemoryAgent.cpp:
2919         (WebCore::DOMTreeStatistics::CounterVisitor::CounterVisitor):
2920         (WebCore::DOMTreeStatistics::CounterVisitor::counters):
2921         (WebCore::DOMTreeStatistics::CounterVisitor::visitNode):
2922
2923 2011-12-30  Pavel Feldman  <pfeldman@google.com>
2924
2925         Web Inspector: migrate from "attached" to "compact" styles.
2926         https://bugs.webkit.org/show_bug.cgi?id=75381
2927
2928         When front-end is docked to right, it should look like "detached", but is still "attached".
2929         Use "compact" mode instead of "attached" mode in the styles to mitigate it.
2930
2931         Reviewed by Yury Semikhatsky.
2932
2933         * inspector/front-end/SearchController.js:
2934         (WebInspector.SearchController.prototype.updateSearchLabel):
2935         * inspector/front-end/Toolbar.js:
2936         (WebInspector.Toolbar.prototype.set compact):
2937         (WebInspector.Toolbar.prototype._toolbarDragStart):
2938         (WebInspector.Toolbar.prototype._toolbarDrag):
2939         * inspector/front-end/helpScreen.css:
2940         (body.compact .help-window-outer):
2941         (body.compact .help-window-main):
2942         (body.compact .help-window-caption):
2943         (body.compact .help-close-button):
2944         (body.compact .help-content):
2945         * inspector/front-end/inspector.css:
2946         (body.compact #toolbar):
2947         (body.compact.port-qt #toolbar):
2948         (body.compact.inactive #toolbar):
2949         (body.compact #search-toolbar-label):
2950         (body.compact #toolbar-dropdown-arrow):
2951         (body.compact #search):
2952         (body.compact.port-qt .toolbar-item.close-left, body.compact.port-qt .toolbar-item.close-right):
2953         (body.compact #main):
2954         * inspector/front-end/inspector.js:
2955         (WebInspector.set attached):
2956         (WebInspector.get isCompactMode):
2957         (WebInspector.get _setCompactMode):
2958         (WebInspector._installDockToRight.listener.get if):
2959         (WebInspector._installDockToRight.listener):
2960         * inspector/front-end/inspectorCommon.css:
2961         (body.dock-to-right):
2962         (body.dock-to-right.inactive):
2963
2964 2011-12-30  Sheriff Bot  <webkit.review.bot@gmail.com>
2965
2966         Unreviewed, rolling out r103794.
2967         http://trac.webkit.org/changeset/103794
2968         https://bugs.webkit.org/show_bug.cgi?id=75379
2969
2970         the ASSERT is triggered by several tests (Requested by
2971         jchaffraix on #webkit).
2972
2973         * rendering/RenderTable.cpp:
2974         (WebCore::RenderTable::RenderTable):
2975         (WebCore::RenderTable::addChild):
2976         (WebCore::RenderTable::layout):
2977         (WebCore::RenderTable::recalcSections):
2978         (WebCore::RenderTable::outerBorderAfter):
2979         (WebCore::RenderTable::sectionAbove):
2980         (WebCore::RenderTable::sectionBelow):
2981         * rendering/RenderTable.h:
2982         (WebCore::RenderTable::header):
2983         (WebCore::RenderTable::footer):
2984         (WebCore::RenderTable::firstBody):
2985         (WebCore::RenderTable::hasSections):
2986         (WebCore::RenderTable::topSection):
2987
2988 2011-12-29  Pavel Feldman  <pfeldman@google.com>
2989
2990         Web Inspector: enable dock-to-right view (still need embedders to support it).
2991         https://bugs.webkit.org/show_bug.cgi?id=75360
2992
2993         Reviewed by Yury Semikhatsky.
2994
2995         * English.lproj/localizedStrings.js:
2996         * inspector/front-end/Settings.js:
2997         (WebInspector.Settings):
2998         * inspector/front-end/SettingsScreen.js:
2999         (WebInspector.SettingsScreen):
3000         * inspector/front-end/inspector.js:
3001         (WebInspector.set attached):
3002         (WebInspector._renderAsAttached.get return):
3003         (WebInspector._renderAsAttached):
3004         (WebInspector._installDockToRight.updateToolbar):
3005
3006 2011-12-29  Raymond Liu  <raymond.liu@intel.com>
3007
3008         Use IDL overloads in AudioContext.idl for createBuffer
3009         https://bugs.webkit.org/show_bug.cgi?id=75293
3010
3011         Reviewed by Adam Barth.
3012
3013         No new tests required.
3014
3015         * bindings/js/JSAudioContextCustom.cpp:
3016         * bindings/v8/custom/V8AudioContextCustom.cpp:
3017         * webaudio/AudioContext.cpp:
3018         (WebCore::AudioContext::createBuffer):
3019         * webaudio/AudioContext.h:
3020         * webaudio/AudioContext.idl:
3021
3022 2011-12-29  Andreas Kling  <awesomekling@apple.com>
3023
3024         HTMLDivElement: Remove unnecessary variable in parseMappedAttribute().
3025         <http://webkit.org/b/75363>
3026
3027         Reviewed by Daniel Bates.
3028
3029         * html/HTMLDivElement.cpp:
3030         (WebCore::HTMLDivElement::parseMappedAttribute):
3031
3032 2011-12-29  Andreas Kling  <awesomekling@apple.com>
3033
3034         HTMLParagraphElement: Remove unnecessary variable in parseMappedAttribute().
3035         <http://webkit.org/b/75362>
3036
3037         Reviewed by Daniel Bates.
3038
3039         * html/HTMLParagraphElement.cpp:
3040         (WebCore::HTMLParagraphElement::parseMappedAttribute):
3041
3042 2011-12-29  Andreas Kling  <awesomekling@apple.com>
3043
3044         Use HashMap<OwnPtr> for Document's named item collection caches.
3045         <http://webkit.org/b/75335>
3046
3047         Reviewed by Daniel Bates.
3048
3049         * dom/Document.cpp:
3050         (WebCore::Document::~Document):
3051
3052             Remove now-unneeded deleteAllValues() loop.
3053
3054         (WebCore::Document::nameCollectionInfo):
3055
3056             Use add() instead of find()/add() to avoid one extra hash lookup.
3057
3058         * dom/Document.h:
3059
3060             Switch the value type of m_nameCollectionInfo to use OwnPtr.
3061
3062 2011-12-29  David Barton  <dbarton@mathscribe.com>
3063
3064         mfenced skips the first separator if the separators attribute contains multiple separators
3065         https://bugs.webkit.org/show_bug.cgi?id=57697
3066
3067         Reviewed by Dan Bernstein.
3068
3069         Added 2 test cases.
3070
3071         * rendering/mathml/RenderMathMLFenced.cpp:
3072         (WebCore::RenderMathMLFenced::addChild):
3073             - Thanks to Xun Sun <xun.sun@intel.com> for the off-by-one error fix.
3074
3075 2011-12-29  Alexis Menard  <alexis.menard@openbossa.org>
3076
3077         Enable the [Supplemental] IDL on Qt.
3078         https://bugs.webkit.org/show_bug.cgi?id=75274
3079
3080         Reviewed by Andreas Kling.
3081
3082         http://trac.webkit.org/changeset/103783 broke the Qt SL bot.
3083         This patch fixes the problem by using 'tr' rather than 'sed' which
3084         seems to be more consistent between Mac and Linux.
3085
3086         * DerivedSources.pri:
3087
3088 2011-12-29  Vsevolod Vlasov  <vsevik@chromium.org>
3089
3090         Web Inspector: Scripts navigator should support incremental search by typing.
3091         https://bugs.webkit.org/show_bug.cgi?id=75349
3092
3093         Reviewed by Pavel Feldman.
3094
3095         * inspector/front-end/ScriptsNavigator.js:
3096         (WebInspector.ScriptsNavigator):
3097         (WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement):
3098         (WebInspector.ScriptsNavigator.prototype.show):
3099         (WebInspector.ScriptsNavigator.prototype._reset):
3100         (WebInspector.NavigatorTreeOutline):
3101         (WebInspector.NavigatorTreeOutline.prototype.scriptTreeElements):
3102         (WebInspector.NavigatorTreeOutline.prototype.searchStarted):
3103         (WebInspector.NavigatorTreeOutline.prototype.searchFinished):
3104         (WebInspector.BaseNavigatorTreeElement.prototype.onreveal):
3105         (WebInspector.BaseNavigatorTreeElement.prototype.set titleText):
3106         (WebInspector.BaseNavigatorTreeElement.prototype.matchesSearchText):
3107         * inspector/front-end/inspector.css:
3108         (.outline-disclosure ol.search-match-not-found li.selected .selection):
3109         (.outline-disclosure ol.search-match-found li.selected):
3110         (.outline-disclosure ol.search-match-found li.selected *):
3111         (.outline-disclosure ol.search-match-found li.parent.selected::before):
3112         (.outline-disclosure ol.search-match-found li.parent.expanded.selected::before):
3113         * inspector/front-end/scriptsPanel.css:
3114         (#scripts-navigator-tree-search-box):
3115         (#scripts-navigator-tree-search-box.visible):
3116         (#scripts-navigator-tree-search-box > input):
3117         (.scripts.panel .navigator .search-match-found li.selected .selection):
3118         (.scripts.panel .navigator .search-match-not-found li.selected .selection):
3119         (.scripts.panel .navigator .searching li.selected .selection):
3120         * inspector/front-end/treeoutline.js:
3121         (TreeOutline):
3122         (TreeOutline.prototype._treeKeyPress):
3123         (TreeOutline.prototype._startSearch.focusSearchInput):
3124         (TreeOutline.prototype._startSearch):
3125         (TreeOutline.prototype._searchTextChanged):
3126         (TreeOutline.prototype._showSearchMatchElement):
3127         (TreeOutline.prototype._searchInputKeyDown):
3128         (TreeOutline.prototype._nextSearchMatch):
3129         (TreeOutline.prototype._previousSearchMatch):
3130         (TreeOutline.prototype._searchInputBlur):
3131         (TreeOutline.prototype._searchFinished):
3132         (TreeOutline.prototype.stopSearch):
3133
3134 2011-12-29  Vsevolod Vlasov  <vsevik@chromium.org>
3135
3136         Web Inspector: Scripts navigator should trim long file names and show full url in tooltip.
3137         https://bugs.webkit.org/show_bug.cgi?id=75343
3138
3139         Reviewed by Pavel Feldman.
3140
3141         Test: inspector/debugger/ui-source-code-display-name.html
3142
3143         * inspector/front-end/ScriptsNavigator.js:
3144         (WebInspector.ScriptsNavigator.prototype.setScriptSourceIsDirty):
3145         * inspector/front-end/ScriptsPanel.js:
3146         (WebInspector.ScriptsPanel.EditorContainer.prototype.showSourceFrame):
3147         (WebInspector.ScriptsPanel.EditorContainer.prototype.replaceSourceFrames):
3148         (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.showSourceFrame):
3149         (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.replaceSourceFrames):
3150         * inspector/front-end/TabbedEditorContainer.js:
3151         (WebInspector.TabbedEditorContainer):
3152         (WebInspector.TabbedEditorContainer.prototype._appendSourceFrameTab):
3153         (WebInspector.TabbedEditorContainer.prototype._tabClosed):
3154         (WebInspector.TabbedEditorContainer.prototype._replaceSourceFrameTab.get if):
3155         (WebInspector.TabbedEditorContainer.prototype._replaceSourceFrameTab):
3156         (WebInspector.TabbedEditorContainer.prototype.get replaceSourceFrames):
3157         (WebInspector.TabbedEditorContainer.prototype.reset):
3158         * inspector/front-end/TabbedPane.js:
3159         (WebInspector.TabbedPane.prototype.appendTab):
3160         (WebInspector.TabbedPane.prototype.changeTabTooltip):
3161         (WebInspector.TabbedPaneTab):
3162         (WebInspector.TabbedPaneTab.prototype.get tooltip):
3163         (WebInspector.TabbedPaneTab.prototype.set tooltip):
3164         (WebInspector.TabbedPaneTab.prototype._createTabElement):
3165         * inspector/front-end/UISourceCode.js:
3166         (WebInspector.UISourceCode.prototype._parseURL):
3167         * inspector/front-end/utilities.js:
3168         ():
3169
3170 2011-12-29  Alexis Menard  <alexis.menard@openbossa.org>
3171
3172         getComputedStyle for margin is not implemented.
3173         https://bugs.webkit.org/show_bug.cgi?id=75358
3174
3175         Reviewed by Andreas Kling.
3176
3177         Implement getComputedStyle for margin.
3178
3179         Test: fast/css/getComputedStyle/getComputedStyle-margin-shorthand.html
3180
3181         * css/CSSComputedStyleDeclaration.cpp:
3182         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3183
3184 2011-12-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3185
3186         Use HashMap<OwnPtr> in RenderSVGResourcePattern
3187         https://bugs.webkit.org/show_bug.cgi?id=75361
3188
3189         Reviewed by Andreas Kling.
3190
3191         * rendering/svg/RenderSVGResourcePattern.cpp:
3192         (WebCore::RenderSVGResourcePattern::removeAllClientsFromCache):
3193         (WebCore::RenderSVGResourcePattern::removeClientFromCache):
3194         (WebCore::RenderSVGResourcePattern::applyResource): use HashMap::add() to avoid
3195         looking up the hash twice.
3196         * rendering/svg/RenderSVGResourcePattern.h: rename m_pattern to m_patternMap to
3197         improve readability a little bit.
3198
3199 2011-12-29  Alexis Menard  <alexis.menard@openbossa.org>
3200
3201         getComputedStyle for padding is not implemented.
3202         https://bugs.webkit.org/show_bug.cgi?id=75352
3203
3204         Reviewed by Andreas Kling.
3205
3206         Implement getComputedStyle for padding shorthand property.
3207
3208         Test: fast/css/getComputedStyle/getComputedStyle-padding-shorthand.html
3209
3210         * css/CSSComputedStyleDeclaration.cpp:
3211         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3212
3213 2011-12-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3214
3215         Use HashMap<OwnPtr> in OriginAccessMap
3216         https://bugs.webkit.org/show_bug.cgi?id=75327
3217
3218         Reviewed by Andreas Kling.
3219
3220         * page/SecurityPolicy.cpp:
3221         (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
3222         (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry):
3223         (WebCore::SecurityPolicy::resetOriginAccessWhitelists):
3224
3225 2011-12-29  Pavel Podivilov  <podivilov@chromium.org>
3226
3227         Web Inspector: support sourceMappingURL magic comment.
3228         https://bugs.webkit.org/show_bug.cgi?id=75356
3229
3230         Reviewed by Pavel Feldman.
3231
3232         * inspector/ContentSearchUtils.cpp:
3233         (WebCore::ContentSearchUtils::findSourceMapURL):
3234         * inspector/ContentSearchUtils.h:
3235         * inspector/InspectorDebuggerAgent.cpp:
3236         (WebCore::InspectorDebuggerAgent::sourceMapURLForScript):
3237
3238 2011-12-29  Alexander Pavlov  <apavlov@chromium.org>
3239
3240         Web Inspector: Suggest pop-over doesn't hide on tab switch
3241         https://bugs.webkit.org/show_bug.cgi?id=73611
3242
3243         Reviewed by Pavel Feldman.
3244
3245         * inspector/front-end/ConsoleView.js:
3246         (WebInspector.ConsoleView.prototype.willHide):
3247         * inspector/front-end/TextPrompt.js:
3248         (WebInspector.TextPrompt.prototype.complete):
3249         (WebInspector.TextPrompt.prototype._completionsReady):
3250         (WebInspector.TextPrompt.prototype.acceptSuggestion):
3251         (WebInspector.TextPrompt.prototype.hideSuggestBox):
3252         (WebInspector.TextPrompt.SuggestBox.prototype._completionsReady):
3253
3254 2011-12-28  Alexander Pavlov  <apavlov@chromium.org>
3255
3256         Web Inspector: Implement CSS selector profiler
3257         https://bugs.webkit.org/show_bug.cgi?id=74004
3258
3259         Reviewed by Pavel Feldman.
3260
3261         This implementation of CSS selector profiler measures the total time required to match a certain selector
3262         against DOM nodes and apply the style declaration properties to the particular element,
3263         as well as the number of selector  matches (i.e. the number of nodes that matched the selector.)
3264         The results are approximate due to internal matching algorithm optimizations (shared styles et al.)
3265         Multiple selectors with the same selectorText are coalesced into a single record.
3266
3267         * English.lproj/localizedStrings.js:
3268         * WebCore.gypi:
3269         * WebCore.vcproj/WebCore.vcproj:
3270         * inspector/compile-front-end.sh:
3271         * inspector/front-end/CSSSelectorProfileView.js: Added.
3272         (WebInspector.CSSSelectorDataGridNode):
3273         (WebInspector.CSSSelectorDataGridNode.prototype.get rawData):
3274         (WebInspector.CSSSelectorProfileView):
3275         (WebInspector.CSSSelectorProfileView.prototype.get statusBarItems):
3276         (WebInspector.CSSSelectorProfileView.prototype.get profile):
3277         (WebInspector.CSSSelectorProfileView.prototype.set profile):
3278         (WebInspector.CSSSelectorProfileView.prototype._createProfileNodes):
3279         (WebInspector.CSSSelectorProfileView.prototype.rebuildGridItems):
3280         (WebInspector.CSSSelectorProfileView.prototype.refreshData):
3281         (WebInspector.CSSSelectorProfileView.prototype.refreshShowAsPercents):
3282         (WebInspector.CSSSelectorProfileView.prototype._sortProfile.get selectorComparator):
3283         (WebInspector.CSSSelectorProfileView.prototype._sortProfile.timeComparator):
3284         (WebInspector.CSSSelectorProfileView.prototype._sortProfile.matchesComparator):
3285         (WebInspector.CSSSelectorProfileView.prototype._sortProfile):
3286         (WebInspector.CSSSelectorProfileType):
3287         (WebInspector.CSSSelectorProfileType.prototype.get buttonTooltip):
3288         (WebInspector.CSSSelectorProfileType.prototype.buttonClicked):
3289         (WebInspector.CSSSelectorProfileType.prototype.get treeItemTitle):
3290         (WebInspector.CSSSelectorProfileType.prototype.get description):
3291         (WebInspector.CSSSelectorProfileType.prototype.reset):
3292         (WebInspector.CSSSelectorProfileType.prototype.isRecordingProfile):
3293         (WebInspector.CSSSelectorProfileType.prototype.setRecordingProfile):
3294         (WebInspector.CSSSelectorProfileType.prototype.startRecordingProfile):
3295         (WebInspector.CSSSelectorProfileType.prototype.stopRecordingProfile):
3296         (WebInspector.CSSSelectorProfileType.prototype.createSidebarTreeElementForProfile):
3297         (WebInspector.CSSSelectorProfileType.prototype.createView):
3298         * inspector/front-end/DetailedHeapshotView.js:
3299         * inspector/front-end/ProfileView.js:
3300         * inspector/front-end/ProfilesPanel.js:
3301         (WebInspector.ProfileType.prototype.reset):
3302         (WebInspector.ProfilesPanel.prototype._reset):
3303         (WebInspector.ProfilesPanel.prototype.addProfileHeader):
3304         (WebInspector.ProfilesPanel.prototype._removeTemporaryProfile):
3305         (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
3306         (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
3307         (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
3308         (WebInspector.ProfilerDispatcher.prototype.addProfileHeader):
3309         * inspector/front-end/WebKit.qrc:
3310         * inspector/front-end/inspector.html:
3311         * inspector/front-end/profilesPanel.css:
3312
3313 2011-12-29  Sheriff Bot  <webkit.review.bot@gmail.com>
3314
3315         Unreviewed, rolling out r103798.
3316         http://trac.webkit.org/changeset/103798
3317         https://bugs.webkit.org/show_bug.cgi?id=75353
3318
3319         some small scrollbar differences are making the tests fail on
3320         several platforms (Requested by jchaffraix on #webkit).
3321
3322         * rendering/RenderLayer.cpp:
3323         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
3324
3325 2011-12-29  Alexander Pavlov  <apavlov@chromium.org>
3326
3327         Web Inspector: Focus of the DOM tree is not restored when switching to the Elements panel
3328         https://bugs.webkit.org/show_bug.cgi?id=75351
3329
3330         Reviewed by Yury Semikhatsky.
3331
3332         * inspector/front-end/ElementsPanel.js:
3333         (WebInspector.ElementsPanel.prototype.wasShown):
3334
3335 2011-12-29  Julien Chaffraix  <jchaffraix@webkit.org>
3336
3337         REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling
3338         https://bugs.webkit.org/show_bug.cgi?id=67100
3339
3340         Reviewed by Dan Bernstein.
3341
3342         Tests: fast/layers/scroll-with-transform-composited-layer-expected.html
3343                fast/layers/scroll-with-transform-composited-layer.html
3344                fast/layers/scroll-with-transform-layer-expected.html
3345                fast/layers/scroll-with-transform-layer.html
3346
3347         The regression came from a previous optimization that was wrongly kept after r93614.
3348
3349         * rendering/RenderLayer.cpp:
3350         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
3351         Remove the early return for transformed layer. This change worked as we used
3352         to call updateLayerPositions from scrollTo which would call updateLayerPosition on
3353         all our descendants. After r93614, this is no longer the case and we explicitely need
3354         to call updateLayerPosition on our descendants from updateLayerPositionsAfterScroll.
3355
3356 2011-12-29  Alexander Pavlov  <apavlov@chromium.org>
3357
3358         Web Inspector: Tree views can be collapsed/hidden using the keyboard arrows
3359         https://bugs.webkit.org/show_bug.cgi?id=46272
3360
3361         Reviewed by Yury Semikhatsky.
3362
3363         WebInspector.SidebarSectionTreeElement which is not selectable has also been made non-collapsible
3364         and expanded by default.
3365
3366         * inspector/front-end/AuditsPanel.js:
3367         (WebInspector.AuditsPanel):
3368         * inspector/front-end/ProfilesPanel.js:
3369         (WebInspector.ProfilesPanel.prototype._registerProfileType):
3370         * inspector/front-end/SidebarTreeElement.js:
3371         (WebInspector.SidebarSectionTreeElement):
3372         (WebInspector.SidebarSectionTreeElement.prototype.selectable.false.collapse):
3373         * inspector/front-end/TimelinePanel.js:
3374         (WebInspector.TimelinePanel):
3375
3376 2011-12-29  Pavel Feldman  <pfeldman@google.com>
3377
3378         Web Inspector: [chromium] pass dock to side request to the embedder.
3379         https://bugs.webkit.org/show_bug.cgi?id=75344
3380
3381         Reviewed by Yury Semikhatsky.
3382
3383         I'd like to enable dock-to-right for the front-end window. This is a background work
3384         to pass control flow from the front-end to the front-end host.
3385
3386         * inspector/InspectorFrontendClient.h:
3387         * inspector/InspectorFrontendClientLocal.h:
3388         (WebCore::InspectorFrontendClientLocal::requestSetDockSide):
3389         * inspector/InspectorFrontendHost.cpp:
3390         (WebCore::InspectorFrontendHost::requestSetDockSide):
3391         * inspector/InspectorFrontendHost.h:
3392         * inspector/InspectorFrontendHost.idl:
3393         * inspector/front-end/InspectorFrontendHostStub.js:
3394         (.WebInspector.InspectorFrontendHostStub.prototype.requestAttachWindow):
3395         (.WebInspector.InspectorFrontendHostStub.prototype.requestDetachWindow):
3396         (.WebInspector.InspectorFrontendHostStub.prototype.requestSetDockSide):
3397
3398 2011-12-28  Pavel Podivilov  <podivilov@chromium.org>
3399
3400         Web Inspector: add "enable source maps" checkbox setting.
3401         https://bugs.webkit.org/show_bug.cgi?id=75311
3402
3403         Reviewed by Pavel Feldman.
3404
3405         When "enable source maps" is on, all auto detected source maps are silently applied.
3406
3407         * English.lproj/localizedStrings.js:
3408         * inspector/front-end/DebuggerPresentationModel.js:
3409         * inspector/front-end/JavaScriptSourceFrame.js:
3410         (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
3411         * inspector/front-end/RawSourceCode.js:
3412         (WebInspector.RawSourceCode):
3413         (WebInspector.RawSourceCode.prototype.setFormatted):
3414         (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping):
3415         (WebInspector.RawSourceCode.prototype._updateSourceMapping):
3416         (WebInspector.RawSourceCode.prototype._createUISourceCode):
3417         * inspector/front-end/Settings.js:
3418         (WebInspector.Settings):
3419         * inspector/front-end/SettingsScreen.js:
3420         (WebInspector.SettingsScreen):
3421         * inspector/front-end/UISourceCode.js:
3422         (WebInspector.UISourceCode):
3423         * inspector/front-end/inspector.js:
3424         (WebInspector._toolbarItemClicked):
3425
3426 2011-12-29  Julien Chaffraix  <jchaffraix@webkit.org>
3427
3428         Tighten our checks for needsSectionRecalc in RenderTable
3429         https://bugs.webkit.org/show_bug.cgi?id=73972
3430
3431         Reviewed by Adam Barth.
3432
3433         Refactoring covered under the new tests.
3434
3435         Now most of the functions use the header, first body and footer's 
3436         getters that checks if we need a section recalculation. The only
3437         exceptions are addChild and recalcSections as they can be called
3438         with the bit set.
3439
3440         * rendering/RenderTable.cpp:
3441         (WebCore::RenderTable::layout):
3442         (WebCore::RenderTable::outerBorderAfter):
3443         (WebCore::RenderTable::sectionAbove):
3444         (WebCore::RenderTable::sectionBelow):
3445         Updated the previous functions to use the sections' getters.
3446
3447         (WebCore::RenderTable::RenderTable):
3448         (WebCore::RenderTable::addChild):
3449         (WebCore::RenderTable::recalcSections):
3450         Update the previous functions after the 2 renames
3451         (see below).
3452
3453         * rendering/RenderTable.h:
3454         (WebCore::RenderTable::header):
3455         (WebCore::RenderTable::footer):
3456         (WebCore::RenderTable::firstBody):
3457         Added some ASSERT here. Also renamed m_head to m_header
3458         and m_foot to m_footer to match the getter and to avoid
3459         unneeded abbreviation.
3460
3461         (WebCore::RenderTable::hasSections):
3462         (WebCore::RenderTable::topSection):
3463         Updated the previous functions to use the section getters.
3464
3465 2011-12-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3466
3467         Use HashMap<OwnPtr> for UserScriptMap and UserStyleSheetMap
3468         https://bugs.webkit.org/show_bug.cgi?id=75323
3469
3470         Reviewed by Darin Adler.
3471
3472         * dom/Document.cpp:
3473         (WebCore::Document::pageGroupUserSheets):
3474         * page/PageGroup.cpp:
3475         (WebCore::PageGroup::addUserScriptToWorld):
3476         (WebCore::PageGroup::addUserStyleSheetToWorld):
3477         (WebCore::PageGroup::removeUserScriptFromWorld):